
bin/kernel：     文件格式 elf32-i386


Disassembly of section .text:

00100000 <kern_init>:
int kern_init(void) __attribute__((noreturn));
void grade_backtrace(void);
static void lab1_switch_test(void);

int
kern_init(void) {
  100000:	55                   	push   %ebp
  100001:	89 e5                	mov    %esp,%ebp
  100003:	83 ec 28             	sub    $0x28,%esp
    extern char edata[], end[];
    memset(edata, 0, end - edata);
  100006:	b8 48 0d 11 00       	mov    $0x110d48,%eax
  10000b:	2d 16 fa 10 00       	sub    $0x10fa16,%eax
  100010:	89 44 24 08          	mov    %eax,0x8(%esp)
  100014:	c7 44 24 04 00 00 00 	movl   $0x0,0x4(%esp)
  10001b:	00 
  10001c:	c7 04 24 16 fa 10 00 	movl   $0x10fa16,(%esp)
  100023:	e8 0c 35 00 00       	call   103534 <memset>

    cons_init();                // init the console
  100028:	e8 bb 15 00 00       	call   1015e8 <cons_init>

    const char *message = "(THU.CST) os is loading ...";
  10002d:	c7 45 f4 c0 36 10 00 	movl   $0x1036c0,-0xc(%ebp)
    cprintf("%s\n\n", message);
  100034:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100037:	89 44 24 04          	mov    %eax,0x4(%esp)
  10003b:	c7 04 24 dc 36 10 00 	movl   $0x1036dc,(%esp)
  100042:	e8 e9 02 00 00       	call   100330 <cprintf>

    print_kerninfo();
  100047:	e8 07 08 00 00       	call   100853 <print_kerninfo>

    grade_backtrace();
  10004c:	e8 95 00 00 00       	call   1000e6 <grade_backtrace>

    pmm_init();                 // init physical memory management
  100051:	e8 35 2b 00 00       	call   102b8b <pmm_init>

    pic_init();                 // init interrupt controller
  100056:	e8 e8 16 00 00       	call   101743 <pic_init>
    idt_init();                 // init interrupt descriptor table
  10005b:	e8 4c 18 00 00       	call   1018ac <idt_init>

    clock_init();               // init clock interrupt
  100060:	e8 24 0d 00 00       	call   100d89 <clock_init>
    intr_enable();              // enable irq interrupt
  100065:	e8 37 16 00 00       	call   1016a1 <intr_enable>

    //LAB1: CAHLLENGE 1 If you try to do it, uncomment lab1_switch_test()
    // user/kernel mode switch test
    lab1_switch_test();
  10006a:	e8 76 01 00 00       	call   1001e5 <lab1_switch_test>
    /* do nothing */
    while (1);
  10006f:	eb fe                	jmp    10006f <kern_init+0x6f>

00100071 <grade_backtrace2>:
}

void __attribute__((noinline))
grade_backtrace2(int arg0, int arg1, int arg2, int arg3) {
  100071:	55                   	push   %ebp
  100072:	89 e5                	mov    %esp,%ebp
  100074:	83 ec 18             	sub    $0x18,%esp
    mon_backtrace(0, NULL, NULL);
  100077:	c7 44 24 08 00 00 00 	movl   $0x0,0x8(%esp)
  10007e:	00 
  10007f:	c7 44 24 04 00 00 00 	movl   $0x0,0x4(%esp)
  100086:	00 
  100087:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  10008e:	e8 11 0c 00 00       	call   100ca4 <mon_backtrace>
}
  100093:	90                   	nop
  100094:	89 ec                	mov    %ebp,%esp
  100096:	5d                   	pop    %ebp
  100097:	c3                   	ret    

00100098 <grade_backtrace1>:

void __attribute__((noinline))
grade_backtrace1(int arg0, int arg1) {
  100098:	55                   	push   %ebp
  100099:	89 e5                	mov    %esp,%ebp
  10009b:	83 ec 18             	sub    $0x18,%esp
  10009e:	89 5d fc             	mov    %ebx,-0x4(%ebp)
    grade_backtrace2(arg0, (int)&arg0, arg1, (int)&arg1);
  1000a1:	8d 4d 0c             	lea    0xc(%ebp),%ecx
  1000a4:	8b 55 0c             	mov    0xc(%ebp),%edx
  1000a7:	8d 5d 08             	lea    0x8(%ebp),%ebx
  1000aa:	8b 45 08             	mov    0x8(%ebp),%eax
  1000ad:	89 4c 24 0c          	mov    %ecx,0xc(%esp)
  1000b1:	89 54 24 08          	mov    %edx,0x8(%esp)
  1000b5:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  1000b9:	89 04 24             	mov    %eax,(%esp)
  1000bc:	e8 b0 ff ff ff       	call   100071 <grade_backtrace2>
}
  1000c1:	90                   	nop
  1000c2:	8b 5d fc             	mov    -0x4(%ebp),%ebx
  1000c5:	89 ec                	mov    %ebp,%esp
  1000c7:	5d                   	pop    %ebp
  1000c8:	c3                   	ret    

001000c9 <grade_backtrace0>:

void __attribute__((noinline))
grade_backtrace0(int arg0, int arg1, int arg2) {
  1000c9:	55                   	push   %ebp
  1000ca:	89 e5                	mov    %esp,%ebp
  1000cc:	83 ec 18             	sub    $0x18,%esp
    grade_backtrace1(arg0, arg2);
  1000cf:	8b 45 10             	mov    0x10(%ebp),%eax
  1000d2:	89 44 24 04          	mov    %eax,0x4(%esp)
  1000d6:	8b 45 08             	mov    0x8(%ebp),%eax
  1000d9:	89 04 24             	mov    %eax,(%esp)
  1000dc:	e8 b7 ff ff ff       	call   100098 <grade_backtrace1>
}
  1000e1:	90                   	nop
  1000e2:	89 ec                	mov    %ebp,%esp
  1000e4:	5d                   	pop    %ebp
  1000e5:	c3                   	ret    

001000e6 <grade_backtrace>:

void
grade_backtrace(void) {
  1000e6:	55                   	push   %ebp
  1000e7:	89 e5                	mov    %esp,%ebp
  1000e9:	83 ec 18             	sub    $0x18,%esp
    grade_backtrace0(0, (int)kern_init, 0xffff0000);
  1000ec:	b8 00 00 10 00       	mov    $0x100000,%eax
  1000f1:	c7 44 24 08 00 00 ff 	movl   $0xffff0000,0x8(%esp)
  1000f8:	ff 
  1000f9:	89 44 24 04          	mov    %eax,0x4(%esp)
  1000fd:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  100104:	e8 c0 ff ff ff       	call   1000c9 <grade_backtrace0>
}
  100109:	90                   	nop
  10010a:	89 ec                	mov    %ebp,%esp
  10010c:	5d                   	pop    %ebp
  10010d:	c3                   	ret    

0010010e <lab1_print_cur_status>:

static void
lab1_print_cur_status(void) {
  10010e:	55                   	push   %ebp
  10010f:	89 e5                	mov    %esp,%ebp
  100111:	83 ec 28             	sub    $0x28,%esp
    static int round = 0;
    uint16_t reg1, reg2, reg3, reg4;
    asm volatile (
  100114:	8c 4d f6             	mov    %cs,-0xa(%ebp)
  100117:	8c 5d f4             	mov    %ds,-0xc(%ebp)
  10011a:	8c 45 f2             	mov    %es,-0xe(%ebp)
  10011d:	8c 55 f0             	mov    %ss,-0x10(%ebp)
            "mov %%cs, %0;"
            "mov %%ds, %1;"
            "mov %%es, %2;"
            "mov %%ss, %3;"
            : "=m"(reg1), "=m"(reg2), "=m"(reg3), "=m"(reg4));
    cprintf("%d: @ring %d\n", round, reg1 & 3);
  100120:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  100124:	83 e0 03             	and    $0x3,%eax
  100127:	89 c2                	mov    %eax,%edx
  100129:	a1 20 fa 10 00       	mov    0x10fa20,%eax
  10012e:	89 54 24 08          	mov    %edx,0x8(%esp)
  100132:	89 44 24 04          	mov    %eax,0x4(%esp)
  100136:	c7 04 24 e1 36 10 00 	movl   $0x1036e1,(%esp)
  10013d:	e8 ee 01 00 00       	call   100330 <cprintf>
    cprintf("%d:  cs = %x\n", round, reg1);
  100142:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  100146:	89 c2                	mov    %eax,%edx
  100148:	a1 20 fa 10 00       	mov    0x10fa20,%eax
  10014d:	89 54 24 08          	mov    %edx,0x8(%esp)
  100151:	89 44 24 04          	mov    %eax,0x4(%esp)
  100155:	c7 04 24 ef 36 10 00 	movl   $0x1036ef,(%esp)
  10015c:	e8 cf 01 00 00       	call   100330 <cprintf>
    cprintf("%d:  ds = %x\n", round, reg2);
  100161:	0f b7 45 f4          	movzwl -0xc(%ebp),%eax
  100165:	89 c2                	mov    %eax,%edx
  100167:	a1 20 fa 10 00       	mov    0x10fa20,%eax
  10016c:	89 54 24 08          	mov    %edx,0x8(%esp)
  100170:	89 44 24 04          	mov    %eax,0x4(%esp)
  100174:	c7 04 24 fd 36 10 00 	movl   $0x1036fd,(%esp)
  10017b:	e8 b0 01 00 00       	call   100330 <cprintf>
    cprintf("%d:  es = %x\n", round, reg3);
  100180:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
  100184:	89 c2                	mov    %eax,%edx
  100186:	a1 20 fa 10 00       	mov    0x10fa20,%eax
  10018b:	89 54 24 08          	mov    %edx,0x8(%esp)
  10018f:	89 44 24 04          	mov    %eax,0x4(%esp)
  100193:	c7 04 24 0b 37 10 00 	movl   $0x10370b,(%esp)
  10019a:	e8 91 01 00 00       	call   100330 <cprintf>
    cprintf("%d:  ss = %x\n", round, reg4);
  10019f:	0f b7 45 f0          	movzwl -0x10(%ebp),%eax
  1001a3:	89 c2                	mov    %eax,%edx
  1001a5:	a1 20 fa 10 00       	mov    0x10fa20,%eax
  1001aa:	89 54 24 08          	mov    %edx,0x8(%esp)
  1001ae:	89 44 24 04          	mov    %eax,0x4(%esp)
  1001b2:	c7 04 24 19 37 10 00 	movl   $0x103719,(%esp)
  1001b9:	e8 72 01 00 00       	call   100330 <cprintf>
    round ++;
  1001be:	a1 20 fa 10 00       	mov    0x10fa20,%eax
  1001c3:	40                   	inc    %eax
  1001c4:	a3 20 fa 10 00       	mov    %eax,0x10fa20
}
  1001c9:	90                   	nop
  1001ca:	89 ec                	mov    %ebp,%esp
  1001cc:	5d                   	pop    %ebp
  1001cd:	c3                   	ret    

001001ce <lab1_switch_to_user>:

static void
lab1_switch_to_user(void) {
  1001ce:	55                   	push   %ebp
  1001cf:	89 e5                	mov    %esp,%ebp
    //LAB1 CHALLENGE 1 : TODO
    asm volatile (
  1001d1:	83 ec 08             	sub    $0x8,%esp
  1001d4:	cd 78                	int    $0x78
  1001d6:	89 ec                	mov    %ebp,%esp
	    "int %0 \n"
	    "movl %%ebp, %%esp"
	    : 
	    : "i"(T_SWITCH_TOU)
	);
}
  1001d8:	90                   	nop
  1001d9:	5d                   	pop    %ebp
  1001da:	c3                   	ret    

001001db <lab1_switch_to_kernel>:

static void
lab1_switch_to_kernel(void) {
  1001db:	55                   	push   %ebp
  1001dc:	89 e5                	mov    %esp,%ebp
    //LAB1 CHALLENGE 1 :  TODO
    asm volatile (
  1001de:	cd 79                	int    $0x79
  1001e0:	89 ec                	mov    %ebp,%esp
	    "int %0 \n"
	    "movl %%ebp, %%esp \n"
	    : 
	    : "i"(T_SWITCH_TOK)
	);
}
  1001e2:	90                   	nop
  1001e3:	5d                   	pop    %ebp
  1001e4:	c3                   	ret    

001001e5 <lab1_switch_test>:

static void
lab1_switch_test(void) {
  1001e5:	55                   	push   %ebp
  1001e6:	89 e5                	mov    %esp,%ebp
  1001e8:	83 ec 18             	sub    $0x18,%esp
    lab1_print_cur_status();
  1001eb:	e8 1e ff ff ff       	call   10010e <lab1_print_cur_status>
    cprintf("+++ switch to  user  mode +++\n");
  1001f0:	c7 04 24 28 37 10 00 	movl   $0x103728,(%esp)
  1001f7:	e8 34 01 00 00       	call   100330 <cprintf>
    lab1_switch_to_user();
  1001fc:	e8 cd ff ff ff       	call   1001ce <lab1_switch_to_user>
    lab1_print_cur_status();
  100201:	e8 08 ff ff ff       	call   10010e <lab1_print_cur_status>
    cprintf("+++ switch to kernel mode +++\n");
  100206:	c7 04 24 48 37 10 00 	movl   $0x103748,(%esp)
  10020d:	e8 1e 01 00 00       	call   100330 <cprintf>
    lab1_switch_to_kernel();
  100212:	e8 c4 ff ff ff       	call   1001db <lab1_switch_to_kernel>
    lab1_print_cur_status();
  100217:	e8 f2 fe ff ff       	call   10010e <lab1_print_cur_status>
}
  10021c:	90                   	nop
  10021d:	89 ec                	mov    %ebp,%esp
  10021f:	5d                   	pop    %ebp
  100220:	c3                   	ret    

00100221 <readline>:
 * The readline() function returns the text of the line read. If some errors
 * are happened, NULL is returned. The return value is a global variable,
 * thus it should be copied before it is used.
 * */
char *
readline(const char *prompt) {
  100221:	55                   	push   %ebp
  100222:	89 e5                	mov    %esp,%ebp
  100224:	83 ec 28             	sub    $0x28,%esp
    if (prompt != NULL) {
  100227:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
  10022b:	74 13                	je     100240 <readline+0x1f>
        cprintf("%s", prompt);
  10022d:	8b 45 08             	mov    0x8(%ebp),%eax
  100230:	89 44 24 04          	mov    %eax,0x4(%esp)
  100234:	c7 04 24 67 37 10 00 	movl   $0x103767,(%esp)
  10023b:	e8 f0 00 00 00       	call   100330 <cprintf>
    }
    int i = 0, c;
  100240:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    while (1) {
        c = getchar();
  100247:	e8 73 01 00 00       	call   1003bf <getchar>
  10024c:	89 45 f0             	mov    %eax,-0x10(%ebp)
        if (c < 0) {
  10024f:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  100253:	79 07                	jns    10025c <readline+0x3b>
            return NULL;
  100255:	b8 00 00 00 00       	mov    $0x0,%eax
  10025a:	eb 78                	jmp    1002d4 <readline+0xb3>
        }
        else if (c >= ' ' && i < BUFSIZE - 1) {
  10025c:	83 7d f0 1f          	cmpl   $0x1f,-0x10(%ebp)
  100260:	7e 28                	jle    10028a <readline+0x69>
  100262:	81 7d f4 fe 03 00 00 	cmpl   $0x3fe,-0xc(%ebp)
  100269:	7f 1f                	jg     10028a <readline+0x69>
            cputchar(c);
  10026b:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10026e:	89 04 24             	mov    %eax,(%esp)
  100271:	e8 e2 00 00 00       	call   100358 <cputchar>
            buf[i ++] = c;
  100276:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100279:	8d 50 01             	lea    0x1(%eax),%edx
  10027c:	89 55 f4             	mov    %edx,-0xc(%ebp)
  10027f:	8b 55 f0             	mov    -0x10(%ebp),%edx
  100282:	88 90 40 fa 10 00    	mov    %dl,0x10fa40(%eax)
  100288:	eb 45                	jmp    1002cf <readline+0xae>
        }
        else if (c == '\b' && i > 0) {
  10028a:	83 7d f0 08          	cmpl   $0x8,-0x10(%ebp)
  10028e:	75 16                	jne    1002a6 <readline+0x85>
  100290:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  100294:	7e 10                	jle    1002a6 <readline+0x85>
            cputchar(c);
  100296:	8b 45 f0             	mov    -0x10(%ebp),%eax
  100299:	89 04 24             	mov    %eax,(%esp)
  10029c:	e8 b7 00 00 00       	call   100358 <cputchar>
            i --;
  1002a1:	ff 4d f4             	decl   -0xc(%ebp)
  1002a4:	eb 29                	jmp    1002cf <readline+0xae>
        }
        else if (c == '\n' || c == '\r') {
  1002a6:	83 7d f0 0a          	cmpl   $0xa,-0x10(%ebp)
  1002aa:	74 06                	je     1002b2 <readline+0x91>
  1002ac:	83 7d f0 0d          	cmpl   $0xd,-0x10(%ebp)
  1002b0:	75 95                	jne    100247 <readline+0x26>
            cputchar(c);
  1002b2:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1002b5:	89 04 24             	mov    %eax,(%esp)
  1002b8:	e8 9b 00 00 00       	call   100358 <cputchar>
            buf[i] = '\0';
  1002bd:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1002c0:	05 40 fa 10 00       	add    $0x10fa40,%eax
  1002c5:	c6 00 00             	movb   $0x0,(%eax)
            return buf;
  1002c8:	b8 40 fa 10 00       	mov    $0x10fa40,%eax
  1002cd:	eb 05                	jmp    1002d4 <readline+0xb3>
        c = getchar();
  1002cf:	e9 73 ff ff ff       	jmp    100247 <readline+0x26>
        }
    }
}
  1002d4:	89 ec                	mov    %ebp,%esp
  1002d6:	5d                   	pop    %ebp
  1002d7:	c3                   	ret    

001002d8 <cputch>:
/* *
 * cputch - writes a single character @c to stdout, and it will
 * increace the value of counter pointed by @cnt.
 * */
static void
cputch(int c, int *cnt) {
  1002d8:	55                   	push   %ebp
  1002d9:	89 e5                	mov    %esp,%ebp
  1002db:	83 ec 18             	sub    $0x18,%esp
    cons_putc(c);
  1002de:	8b 45 08             	mov    0x8(%ebp),%eax
  1002e1:	89 04 24             	mov    %eax,(%esp)
  1002e4:	e8 2e 13 00 00       	call   101617 <cons_putc>
    (*cnt) ++;
  1002e9:	8b 45 0c             	mov    0xc(%ebp),%eax
  1002ec:	8b 00                	mov    (%eax),%eax
  1002ee:	8d 50 01             	lea    0x1(%eax),%edx
  1002f1:	8b 45 0c             	mov    0xc(%ebp),%eax
  1002f4:	89 10                	mov    %edx,(%eax)
}
  1002f6:	90                   	nop
  1002f7:	89 ec                	mov    %ebp,%esp
  1002f9:	5d                   	pop    %ebp
  1002fa:	c3                   	ret    

001002fb <vcprintf>:
 *
 * Call this function if you are already dealing with a va_list.
 * Or you probably want cprintf() instead.
 * */
int
vcprintf(const char *fmt, va_list ap) {
  1002fb:	55                   	push   %ebp
  1002fc:	89 e5                	mov    %esp,%ebp
  1002fe:	83 ec 28             	sub    $0x28,%esp
    int cnt = 0;
  100301:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    vprintfmt((void*)cputch, &cnt, fmt, ap);
  100308:	8b 45 0c             	mov    0xc(%ebp),%eax
  10030b:	89 44 24 0c          	mov    %eax,0xc(%esp)
  10030f:	8b 45 08             	mov    0x8(%ebp),%eax
  100312:	89 44 24 08          	mov    %eax,0x8(%esp)
  100316:	8d 45 f4             	lea    -0xc(%ebp),%eax
  100319:	89 44 24 04          	mov    %eax,0x4(%esp)
  10031d:	c7 04 24 d8 02 10 00 	movl   $0x1002d8,(%esp)
  100324:	e8 36 2a 00 00       	call   102d5f <vprintfmt>
    return cnt;
  100329:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  10032c:	89 ec                	mov    %ebp,%esp
  10032e:	5d                   	pop    %ebp
  10032f:	c3                   	ret    

00100330 <cprintf>:
 *
 * The return value is the number of characters which would be
 * written to stdout.
 * */
int
cprintf(const char *fmt, ...) {
  100330:	55                   	push   %ebp
  100331:	89 e5                	mov    %esp,%ebp
  100333:	83 ec 28             	sub    $0x28,%esp
    va_list ap;
    int cnt;
    va_start(ap, fmt);
  100336:	8d 45 0c             	lea    0xc(%ebp),%eax
  100339:	89 45 f0             	mov    %eax,-0x10(%ebp)
    cnt = vcprintf(fmt, ap);
  10033c:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10033f:	89 44 24 04          	mov    %eax,0x4(%esp)
  100343:	8b 45 08             	mov    0x8(%ebp),%eax
  100346:	89 04 24             	mov    %eax,(%esp)
  100349:	e8 ad ff ff ff       	call   1002fb <vcprintf>
  10034e:	89 45 f4             	mov    %eax,-0xc(%ebp)
    va_end(ap);
    return cnt;
  100351:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  100354:	89 ec                	mov    %ebp,%esp
  100356:	5d                   	pop    %ebp
  100357:	c3                   	ret    

00100358 <cputchar>:

/* cputchar - writes a single character to stdout */
void
cputchar(int c) {
  100358:	55                   	push   %ebp
  100359:	89 e5                	mov    %esp,%ebp
  10035b:	83 ec 18             	sub    $0x18,%esp
    cons_putc(c);
  10035e:	8b 45 08             	mov    0x8(%ebp),%eax
  100361:	89 04 24             	mov    %eax,(%esp)
  100364:	e8 ae 12 00 00       	call   101617 <cons_putc>
}
  100369:	90                   	nop
  10036a:	89 ec                	mov    %ebp,%esp
  10036c:	5d                   	pop    %ebp
  10036d:	c3                   	ret    

0010036e <cputs>:
/* *
 * cputs- writes the string pointed by @str to stdout and
 * appends a newline character.
 * */
int
cputs(const char *str) {
  10036e:	55                   	push   %ebp
  10036f:	89 e5                	mov    %esp,%ebp
  100371:	83 ec 28             	sub    $0x28,%esp
    int cnt = 0;
  100374:	c7 45 f0 00 00 00 00 	movl   $0x0,-0x10(%ebp)
    char c;
    while ((c = *str ++) != '\0') {
  10037b:	eb 13                	jmp    100390 <cputs+0x22>
        cputch(c, &cnt);
  10037d:	0f be 45 f7          	movsbl -0x9(%ebp),%eax
  100381:	8d 55 f0             	lea    -0x10(%ebp),%edx
  100384:	89 54 24 04          	mov    %edx,0x4(%esp)
  100388:	89 04 24             	mov    %eax,(%esp)
  10038b:	e8 48 ff ff ff       	call   1002d8 <cputch>
    while ((c = *str ++) != '\0') {
  100390:	8b 45 08             	mov    0x8(%ebp),%eax
  100393:	8d 50 01             	lea    0x1(%eax),%edx
  100396:	89 55 08             	mov    %edx,0x8(%ebp)
  100399:	0f b6 00             	movzbl (%eax),%eax
  10039c:	88 45 f7             	mov    %al,-0x9(%ebp)
  10039f:	80 7d f7 00          	cmpb   $0x0,-0x9(%ebp)
  1003a3:	75 d8                	jne    10037d <cputs+0xf>
    }
    cputch('\n', &cnt);
  1003a5:	8d 45 f0             	lea    -0x10(%ebp),%eax
  1003a8:	89 44 24 04          	mov    %eax,0x4(%esp)
  1003ac:	c7 04 24 0a 00 00 00 	movl   $0xa,(%esp)
  1003b3:	e8 20 ff ff ff       	call   1002d8 <cputch>
    return cnt;
  1003b8:	8b 45 f0             	mov    -0x10(%ebp),%eax
}
  1003bb:	89 ec                	mov    %ebp,%esp
  1003bd:	5d                   	pop    %ebp
  1003be:	c3                   	ret    

001003bf <getchar>:

/* getchar - reads a single non-zero character from stdin */
int
getchar(void) {
  1003bf:	55                   	push   %ebp
  1003c0:	89 e5                	mov    %esp,%ebp
  1003c2:	83 ec 18             	sub    $0x18,%esp
    int c;
    while ((c = cons_getc()) == 0)
  1003c5:	90                   	nop
  1003c6:	e8 78 12 00 00       	call   101643 <cons_getc>
  1003cb:	89 45 f4             	mov    %eax,-0xc(%ebp)
  1003ce:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  1003d2:	74 f2                	je     1003c6 <getchar+0x7>
        /* do nothing */;
    return c;
  1003d4:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  1003d7:	89 ec                	mov    %ebp,%esp
  1003d9:	5d                   	pop    %ebp
  1003da:	c3                   	ret    

001003db <stab_binsearch>:
 *      stab_binsearch(stabs, &left, &right, N_SO, 0xf0100184);
 * will exit setting left = 118, right = 554.
 * */
static void
stab_binsearch(const struct stab *stabs, int *region_left, int *region_right,
           int type, uintptr_t addr) {
  1003db:	55                   	push   %ebp
  1003dc:	89 e5                	mov    %esp,%ebp
  1003de:	83 ec 20             	sub    $0x20,%esp
    int l = *region_left, r = *region_right, any_matches = 0;
  1003e1:	8b 45 0c             	mov    0xc(%ebp),%eax
  1003e4:	8b 00                	mov    (%eax),%eax
  1003e6:	89 45 fc             	mov    %eax,-0x4(%ebp)
  1003e9:	8b 45 10             	mov    0x10(%ebp),%eax
  1003ec:	8b 00                	mov    (%eax),%eax
  1003ee:	89 45 f8             	mov    %eax,-0x8(%ebp)
  1003f1:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)

    while (l <= r) {
  1003f8:	e9 ca 00 00 00       	jmp    1004c7 <stab_binsearch+0xec>
        int true_m = (l + r) / 2, m = true_m;
  1003fd:	8b 55 fc             	mov    -0x4(%ebp),%edx
  100400:	8b 45 f8             	mov    -0x8(%ebp),%eax
  100403:	01 d0                	add    %edx,%eax
  100405:	89 c2                	mov    %eax,%edx
  100407:	c1 ea 1f             	shr    $0x1f,%edx
  10040a:	01 d0                	add    %edx,%eax
  10040c:	d1 f8                	sar    %eax
  10040e:	89 45 ec             	mov    %eax,-0x14(%ebp)
  100411:	8b 45 ec             	mov    -0x14(%ebp),%eax
  100414:	89 45 f0             	mov    %eax,-0x10(%ebp)

        // search for earliest stab with right type
        while (m >= l && stabs[m].n_type != type) {
  100417:	eb 03                	jmp    10041c <stab_binsearch+0x41>
            m --;
  100419:	ff 4d f0             	decl   -0x10(%ebp)
        while (m >= l && stabs[m].n_type != type) {
  10041c:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10041f:	3b 45 fc             	cmp    -0x4(%ebp),%eax
  100422:	7c 1f                	jl     100443 <stab_binsearch+0x68>
  100424:	8b 55 f0             	mov    -0x10(%ebp),%edx
  100427:	89 d0                	mov    %edx,%eax
  100429:	01 c0                	add    %eax,%eax
  10042b:	01 d0                	add    %edx,%eax
  10042d:	c1 e0 02             	shl    $0x2,%eax
  100430:	89 c2                	mov    %eax,%edx
  100432:	8b 45 08             	mov    0x8(%ebp),%eax
  100435:	01 d0                	add    %edx,%eax
  100437:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  10043b:	0f b6 c0             	movzbl %al,%eax
  10043e:	39 45 14             	cmp    %eax,0x14(%ebp)
  100441:	75 d6                	jne    100419 <stab_binsearch+0x3e>
        }
        if (m < l) {    // no match in [l, m]
  100443:	8b 45 f0             	mov    -0x10(%ebp),%eax
  100446:	3b 45 fc             	cmp    -0x4(%ebp),%eax
  100449:	7d 09                	jge    100454 <stab_binsearch+0x79>
            l = true_m + 1;
  10044b:	8b 45 ec             	mov    -0x14(%ebp),%eax
  10044e:	40                   	inc    %eax
  10044f:	89 45 fc             	mov    %eax,-0x4(%ebp)
            continue;
  100452:	eb 73                	jmp    1004c7 <stab_binsearch+0xec>
        }

        // actual binary search
        any_matches = 1;
  100454:	c7 45 f4 01 00 00 00 	movl   $0x1,-0xc(%ebp)
        if (stabs[m].n_value < addr) {
  10045b:	8b 55 f0             	mov    -0x10(%ebp),%edx
  10045e:	89 d0                	mov    %edx,%eax
  100460:	01 c0                	add    %eax,%eax
  100462:	01 d0                	add    %edx,%eax
  100464:	c1 e0 02             	shl    $0x2,%eax
  100467:	89 c2                	mov    %eax,%edx
  100469:	8b 45 08             	mov    0x8(%ebp),%eax
  10046c:	01 d0                	add    %edx,%eax
  10046e:	8b 40 08             	mov    0x8(%eax),%eax
  100471:	39 45 18             	cmp    %eax,0x18(%ebp)
  100474:	76 11                	jbe    100487 <stab_binsearch+0xac>
            *region_left = m;
  100476:	8b 45 0c             	mov    0xc(%ebp),%eax
  100479:	8b 55 f0             	mov    -0x10(%ebp),%edx
  10047c:	89 10                	mov    %edx,(%eax)
            l = true_m + 1;
  10047e:	8b 45 ec             	mov    -0x14(%ebp),%eax
  100481:	40                   	inc    %eax
  100482:	89 45 fc             	mov    %eax,-0x4(%ebp)
  100485:	eb 40                	jmp    1004c7 <stab_binsearch+0xec>
        } else if (stabs[m].n_value > addr) {
  100487:	8b 55 f0             	mov    -0x10(%ebp),%edx
  10048a:	89 d0                	mov    %edx,%eax
  10048c:	01 c0                	add    %eax,%eax
  10048e:	01 d0                	add    %edx,%eax
  100490:	c1 e0 02             	shl    $0x2,%eax
  100493:	89 c2                	mov    %eax,%edx
  100495:	8b 45 08             	mov    0x8(%ebp),%eax
  100498:	01 d0                	add    %edx,%eax
  10049a:	8b 40 08             	mov    0x8(%eax),%eax
  10049d:	39 45 18             	cmp    %eax,0x18(%ebp)
  1004a0:	73 14                	jae    1004b6 <stab_binsearch+0xdb>
            *region_right = m - 1;
  1004a2:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1004a5:	8d 50 ff             	lea    -0x1(%eax),%edx
  1004a8:	8b 45 10             	mov    0x10(%ebp),%eax
  1004ab:	89 10                	mov    %edx,(%eax)
            r = m - 1;
  1004ad:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1004b0:	48                   	dec    %eax
  1004b1:	89 45 f8             	mov    %eax,-0x8(%ebp)
  1004b4:	eb 11                	jmp    1004c7 <stab_binsearch+0xec>
        } else {
            // exact match for 'addr', but continue loop to find
            // *region_right
            *region_left = m;
  1004b6:	8b 45 0c             	mov    0xc(%ebp),%eax
  1004b9:	8b 55 f0             	mov    -0x10(%ebp),%edx
  1004bc:	89 10                	mov    %edx,(%eax)
            l = m;
  1004be:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1004c1:	89 45 fc             	mov    %eax,-0x4(%ebp)
            addr ++;
  1004c4:	ff 45 18             	incl   0x18(%ebp)
    while (l <= r) {
  1004c7:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1004ca:	3b 45 f8             	cmp    -0x8(%ebp),%eax
  1004cd:	0f 8e 2a ff ff ff    	jle    1003fd <stab_binsearch+0x22>
        }
    }

    if (!any_matches) {
  1004d3:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  1004d7:	75 0f                	jne    1004e8 <stab_binsearch+0x10d>
        *region_right = *region_left - 1;
  1004d9:	8b 45 0c             	mov    0xc(%ebp),%eax
  1004dc:	8b 00                	mov    (%eax),%eax
  1004de:	8d 50 ff             	lea    -0x1(%eax),%edx
  1004e1:	8b 45 10             	mov    0x10(%ebp),%eax
  1004e4:	89 10                	mov    %edx,(%eax)
        l = *region_right;
        for (; l > *region_left && stabs[l].n_type != type; l --)
            /* do nothing */;
        *region_left = l;
    }
}
  1004e6:	eb 3e                	jmp    100526 <stab_binsearch+0x14b>
        l = *region_right;
  1004e8:	8b 45 10             	mov    0x10(%ebp),%eax
  1004eb:	8b 00                	mov    (%eax),%eax
  1004ed:	89 45 fc             	mov    %eax,-0x4(%ebp)
        for (; l > *region_left && stabs[l].n_type != type; l --)
  1004f0:	eb 03                	jmp    1004f5 <stab_binsearch+0x11a>
  1004f2:	ff 4d fc             	decl   -0x4(%ebp)
  1004f5:	8b 45 0c             	mov    0xc(%ebp),%eax
  1004f8:	8b 00                	mov    (%eax),%eax
  1004fa:	39 45 fc             	cmp    %eax,-0x4(%ebp)
  1004fd:	7e 1f                	jle    10051e <stab_binsearch+0x143>
  1004ff:	8b 55 fc             	mov    -0x4(%ebp),%edx
  100502:	89 d0                	mov    %edx,%eax
  100504:	01 c0                	add    %eax,%eax
  100506:	01 d0                	add    %edx,%eax
  100508:	c1 e0 02             	shl    $0x2,%eax
  10050b:	89 c2                	mov    %eax,%edx
  10050d:	8b 45 08             	mov    0x8(%ebp),%eax
  100510:	01 d0                	add    %edx,%eax
  100512:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  100516:	0f b6 c0             	movzbl %al,%eax
  100519:	39 45 14             	cmp    %eax,0x14(%ebp)
  10051c:	75 d4                	jne    1004f2 <stab_binsearch+0x117>
        *region_left = l;
  10051e:	8b 45 0c             	mov    0xc(%ebp),%eax
  100521:	8b 55 fc             	mov    -0x4(%ebp),%edx
  100524:	89 10                	mov    %edx,(%eax)
}
  100526:	90                   	nop
  100527:	89 ec                	mov    %ebp,%esp
  100529:	5d                   	pop    %ebp
  10052a:	c3                   	ret    

0010052b <debuginfo_eip>:
 * the specified instruction address, @addr.  Returns 0 if information
 * was found, and negative if not.  But even if it returns negative it
 * has stored some information into '*info'.
 * */
int
debuginfo_eip(uintptr_t addr, struct eipdebuginfo *info) {
  10052b:	55                   	push   %ebp
  10052c:	89 e5                	mov    %esp,%ebp
  10052e:	83 ec 58             	sub    $0x58,%esp
    const struct stab *stabs, *stab_end;
    const char *stabstr, *stabstr_end;

    info->eip_file = "<unknown>";
  100531:	8b 45 0c             	mov    0xc(%ebp),%eax
  100534:	c7 00 6c 37 10 00    	movl   $0x10376c,(%eax)
    info->eip_line = 0;
  10053a:	8b 45 0c             	mov    0xc(%ebp),%eax
  10053d:	c7 40 04 00 00 00 00 	movl   $0x0,0x4(%eax)
    info->eip_fn_name = "<unknown>";
  100544:	8b 45 0c             	mov    0xc(%ebp),%eax
  100547:	c7 40 08 6c 37 10 00 	movl   $0x10376c,0x8(%eax)
    info->eip_fn_namelen = 9;
  10054e:	8b 45 0c             	mov    0xc(%ebp),%eax
  100551:	c7 40 0c 09 00 00 00 	movl   $0x9,0xc(%eax)
    info->eip_fn_addr = addr;
  100558:	8b 45 0c             	mov    0xc(%ebp),%eax
  10055b:	8b 55 08             	mov    0x8(%ebp),%edx
  10055e:	89 50 10             	mov    %edx,0x10(%eax)
    info->eip_fn_narg = 0;
  100561:	8b 45 0c             	mov    0xc(%ebp),%eax
  100564:	c7 40 14 00 00 00 00 	movl   $0x0,0x14(%eax)

    stabs = __STAB_BEGIN__;
  10056b:	c7 45 f4 cc 3f 10 00 	movl   $0x103fcc,-0xc(%ebp)
    stab_end = __STAB_END__;
  100572:	c7 45 f0 00 c0 10 00 	movl   $0x10c000,-0x10(%ebp)
    stabstr = __STABSTR_BEGIN__;
  100579:	c7 45 ec 01 c0 10 00 	movl   $0x10c001,-0x14(%ebp)
    stabstr_end = __STABSTR_END__;
  100580:	c7 45 e8 b5 e9 10 00 	movl   $0x10e9b5,-0x18(%ebp)

    // String table validity checks
    if (stabstr_end <= stabstr || stabstr_end[-1] != 0) {
  100587:	8b 45 e8             	mov    -0x18(%ebp),%eax
  10058a:	3b 45 ec             	cmp    -0x14(%ebp),%eax
  10058d:	76 0b                	jbe    10059a <debuginfo_eip+0x6f>
  10058f:	8b 45 e8             	mov    -0x18(%ebp),%eax
  100592:	48                   	dec    %eax
  100593:	0f b6 00             	movzbl (%eax),%eax
  100596:	84 c0                	test   %al,%al
  100598:	74 0a                	je     1005a4 <debuginfo_eip+0x79>
        return -1;
  10059a:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  10059f:	e9 ab 02 00 00       	jmp    10084f <debuginfo_eip+0x324>
    // 'eip'.  First, we find the basic source file containing 'eip'.
    // Then, we look in that source file for the function.  Then we look
    // for the line number.

    // Search the entire set of stabs for the source file (type N_SO).
    int lfile = 0, rfile = (stab_end - stabs) - 1;
  1005a4:	c7 45 e4 00 00 00 00 	movl   $0x0,-0x1c(%ebp)
  1005ab:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1005ae:	2b 45 f4             	sub    -0xc(%ebp),%eax
  1005b1:	c1 f8 02             	sar    $0x2,%eax
  1005b4:	69 c0 ab aa aa aa    	imul   $0xaaaaaaab,%eax,%eax
  1005ba:	48                   	dec    %eax
  1005bb:	89 45 e0             	mov    %eax,-0x20(%ebp)
    stab_binsearch(stabs, &lfile, &rfile, N_SO, addr);
  1005be:	8b 45 08             	mov    0x8(%ebp),%eax
  1005c1:	89 44 24 10          	mov    %eax,0x10(%esp)
  1005c5:	c7 44 24 0c 64 00 00 	movl   $0x64,0xc(%esp)
  1005cc:	00 
  1005cd:	8d 45 e0             	lea    -0x20(%ebp),%eax
  1005d0:	89 44 24 08          	mov    %eax,0x8(%esp)
  1005d4:	8d 45 e4             	lea    -0x1c(%ebp),%eax
  1005d7:	89 44 24 04          	mov    %eax,0x4(%esp)
  1005db:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1005de:	89 04 24             	mov    %eax,(%esp)
  1005e1:	e8 f5 fd ff ff       	call   1003db <stab_binsearch>
    if (lfile == 0)
  1005e6:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  1005e9:	85 c0                	test   %eax,%eax
  1005eb:	75 0a                	jne    1005f7 <debuginfo_eip+0xcc>
        return -1;
  1005ed:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  1005f2:	e9 58 02 00 00       	jmp    10084f <debuginfo_eip+0x324>

    // Search within that file's stabs for the function definition
    // (N_FUN).
    int lfun = lfile, rfun = rfile;
  1005f7:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  1005fa:	89 45 dc             	mov    %eax,-0x24(%ebp)
  1005fd:	8b 45 e0             	mov    -0x20(%ebp),%eax
  100600:	89 45 d8             	mov    %eax,-0x28(%ebp)
    int lline, rline;
    stab_binsearch(stabs, &lfun, &rfun, N_FUN, addr);
  100603:	8b 45 08             	mov    0x8(%ebp),%eax
  100606:	89 44 24 10          	mov    %eax,0x10(%esp)
  10060a:	c7 44 24 0c 24 00 00 	movl   $0x24,0xc(%esp)
  100611:	00 
  100612:	8d 45 d8             	lea    -0x28(%ebp),%eax
  100615:	89 44 24 08          	mov    %eax,0x8(%esp)
  100619:	8d 45 dc             	lea    -0x24(%ebp),%eax
  10061c:	89 44 24 04          	mov    %eax,0x4(%esp)
  100620:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100623:	89 04 24             	mov    %eax,(%esp)
  100626:	e8 b0 fd ff ff       	call   1003db <stab_binsearch>

    if (lfun <= rfun) {
  10062b:	8b 55 dc             	mov    -0x24(%ebp),%edx
  10062e:	8b 45 d8             	mov    -0x28(%ebp),%eax
  100631:	39 c2                	cmp    %eax,%edx
  100633:	7f 78                	jg     1006ad <debuginfo_eip+0x182>
        // stabs[lfun] points to the function name
        // in the string table, but check bounds just in case.
        if (stabs[lfun].n_strx < stabstr_end - stabstr) {
  100635:	8b 45 dc             	mov    -0x24(%ebp),%eax
  100638:	89 c2                	mov    %eax,%edx
  10063a:	89 d0                	mov    %edx,%eax
  10063c:	01 c0                	add    %eax,%eax
  10063e:	01 d0                	add    %edx,%eax
  100640:	c1 e0 02             	shl    $0x2,%eax
  100643:	89 c2                	mov    %eax,%edx
  100645:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100648:	01 d0                	add    %edx,%eax
  10064a:	8b 10                	mov    (%eax),%edx
  10064c:	8b 45 e8             	mov    -0x18(%ebp),%eax
  10064f:	2b 45 ec             	sub    -0x14(%ebp),%eax
  100652:	39 c2                	cmp    %eax,%edx
  100654:	73 22                	jae    100678 <debuginfo_eip+0x14d>
            info->eip_fn_name = stabstr + stabs[lfun].n_strx;
  100656:	8b 45 dc             	mov    -0x24(%ebp),%eax
  100659:	89 c2                	mov    %eax,%edx
  10065b:	89 d0                	mov    %edx,%eax
  10065d:	01 c0                	add    %eax,%eax
  10065f:	01 d0                	add    %edx,%eax
  100661:	c1 e0 02             	shl    $0x2,%eax
  100664:	89 c2                	mov    %eax,%edx
  100666:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100669:	01 d0                	add    %edx,%eax
  10066b:	8b 10                	mov    (%eax),%edx
  10066d:	8b 45 ec             	mov    -0x14(%ebp),%eax
  100670:	01 c2                	add    %eax,%edx
  100672:	8b 45 0c             	mov    0xc(%ebp),%eax
  100675:	89 50 08             	mov    %edx,0x8(%eax)
        }
        info->eip_fn_addr = stabs[lfun].n_value;
  100678:	8b 45 dc             	mov    -0x24(%ebp),%eax
  10067b:	89 c2                	mov    %eax,%edx
  10067d:	89 d0                	mov    %edx,%eax
  10067f:	01 c0                	add    %eax,%eax
  100681:	01 d0                	add    %edx,%eax
  100683:	c1 e0 02             	shl    $0x2,%eax
  100686:	89 c2                	mov    %eax,%edx
  100688:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10068b:	01 d0                	add    %edx,%eax
  10068d:	8b 50 08             	mov    0x8(%eax),%edx
  100690:	8b 45 0c             	mov    0xc(%ebp),%eax
  100693:	89 50 10             	mov    %edx,0x10(%eax)
        addr -= info->eip_fn_addr;
  100696:	8b 45 0c             	mov    0xc(%ebp),%eax
  100699:	8b 40 10             	mov    0x10(%eax),%eax
  10069c:	29 45 08             	sub    %eax,0x8(%ebp)
        // Search within the function definition for the line number.
        lline = lfun;
  10069f:	8b 45 dc             	mov    -0x24(%ebp),%eax
  1006a2:	89 45 d4             	mov    %eax,-0x2c(%ebp)
        rline = rfun;
  1006a5:	8b 45 d8             	mov    -0x28(%ebp),%eax
  1006a8:	89 45 d0             	mov    %eax,-0x30(%ebp)
  1006ab:	eb 15                	jmp    1006c2 <debuginfo_eip+0x197>
    } else {
        // Couldn't find function stab!  Maybe we're in an assembly
        // file.  Search the whole file for the line number.
        info->eip_fn_addr = addr;
  1006ad:	8b 45 0c             	mov    0xc(%ebp),%eax
  1006b0:	8b 55 08             	mov    0x8(%ebp),%edx
  1006b3:	89 50 10             	mov    %edx,0x10(%eax)
        lline = lfile;
  1006b6:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  1006b9:	89 45 d4             	mov    %eax,-0x2c(%ebp)
        rline = rfile;
  1006bc:	8b 45 e0             	mov    -0x20(%ebp),%eax
  1006bf:	89 45 d0             	mov    %eax,-0x30(%ebp)
    }
    info->eip_fn_namelen = strfind(info->eip_fn_name, ':') - info->eip_fn_name;
  1006c2:	8b 45 0c             	mov    0xc(%ebp),%eax
  1006c5:	8b 40 08             	mov    0x8(%eax),%eax
  1006c8:	c7 44 24 04 3a 00 00 	movl   $0x3a,0x4(%esp)
  1006cf:	00 
  1006d0:	89 04 24             	mov    %eax,(%esp)
  1006d3:	e8 d4 2c 00 00       	call   1033ac <strfind>
  1006d8:	8b 55 0c             	mov    0xc(%ebp),%edx
  1006db:	8b 4a 08             	mov    0x8(%edx),%ecx
  1006de:	29 c8                	sub    %ecx,%eax
  1006e0:	89 c2                	mov    %eax,%edx
  1006e2:	8b 45 0c             	mov    0xc(%ebp),%eax
  1006e5:	89 50 0c             	mov    %edx,0xc(%eax)

    // Search within [lline, rline] for the line number stab.
    // If found, set info->eip_line to the right line number.
    // If not found, return -1.
    stab_binsearch(stabs, &lline, &rline, N_SLINE, addr);
  1006e8:	8b 45 08             	mov    0x8(%ebp),%eax
  1006eb:	89 44 24 10          	mov    %eax,0x10(%esp)
  1006ef:	c7 44 24 0c 44 00 00 	movl   $0x44,0xc(%esp)
  1006f6:	00 
  1006f7:	8d 45 d0             	lea    -0x30(%ebp),%eax
  1006fa:	89 44 24 08          	mov    %eax,0x8(%esp)
  1006fe:	8d 45 d4             	lea    -0x2c(%ebp),%eax
  100701:	89 44 24 04          	mov    %eax,0x4(%esp)
  100705:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100708:	89 04 24             	mov    %eax,(%esp)
  10070b:	e8 cb fc ff ff       	call   1003db <stab_binsearch>
    if (lline <= rline) {
  100710:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  100713:	8b 45 d0             	mov    -0x30(%ebp),%eax
  100716:	39 c2                	cmp    %eax,%edx
  100718:	7f 23                	jg     10073d <debuginfo_eip+0x212>
        info->eip_line = stabs[rline].n_desc;
  10071a:	8b 45 d0             	mov    -0x30(%ebp),%eax
  10071d:	89 c2                	mov    %eax,%edx
  10071f:	89 d0                	mov    %edx,%eax
  100721:	01 c0                	add    %eax,%eax
  100723:	01 d0                	add    %edx,%eax
  100725:	c1 e0 02             	shl    $0x2,%eax
  100728:	89 c2                	mov    %eax,%edx
  10072a:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10072d:	01 d0                	add    %edx,%eax
  10072f:	0f b7 40 06          	movzwl 0x6(%eax),%eax
  100733:	89 c2                	mov    %eax,%edx
  100735:	8b 45 0c             	mov    0xc(%ebp),%eax
  100738:	89 50 04             	mov    %edx,0x4(%eax)

    // Search backwards from the line number for the relevant filename stab.
    // We can't just use the "lfile" stab because inlined functions
    // can interpolate code from a different file!
    // Such included source files use the N_SOL stab type.
    while (lline >= lfile
  10073b:	eb 11                	jmp    10074e <debuginfo_eip+0x223>
        return -1;
  10073d:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  100742:	e9 08 01 00 00       	jmp    10084f <debuginfo_eip+0x324>
           && stabs[lline].n_type != N_SOL
           && (stabs[lline].n_type != N_SO || !stabs[lline].n_value)) {
        lline --;
  100747:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  10074a:	48                   	dec    %eax
  10074b:	89 45 d4             	mov    %eax,-0x2c(%ebp)
    while (lline >= lfile
  10074e:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  100751:	8b 45 e4             	mov    -0x1c(%ebp),%eax
           && (stabs[lline].n_type != N_SO || !stabs[lline].n_value)) {
  100754:	39 c2                	cmp    %eax,%edx
  100756:	7c 56                	jl     1007ae <debuginfo_eip+0x283>
           && stabs[lline].n_type != N_SOL
  100758:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  10075b:	89 c2                	mov    %eax,%edx
  10075d:	89 d0                	mov    %edx,%eax
  10075f:	01 c0                	add    %eax,%eax
  100761:	01 d0                	add    %edx,%eax
  100763:	c1 e0 02             	shl    $0x2,%eax
  100766:	89 c2                	mov    %eax,%edx
  100768:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10076b:	01 d0                	add    %edx,%eax
  10076d:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  100771:	3c 84                	cmp    $0x84,%al
  100773:	74 39                	je     1007ae <debuginfo_eip+0x283>
           && (stabs[lline].n_type != N_SO || !stabs[lline].n_value)) {
  100775:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  100778:	89 c2                	mov    %eax,%edx
  10077a:	89 d0                	mov    %edx,%eax
  10077c:	01 c0                	add    %eax,%eax
  10077e:	01 d0                	add    %edx,%eax
  100780:	c1 e0 02             	shl    $0x2,%eax
  100783:	89 c2                	mov    %eax,%edx
  100785:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100788:	01 d0                	add    %edx,%eax
  10078a:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  10078e:	3c 64                	cmp    $0x64,%al
  100790:	75 b5                	jne    100747 <debuginfo_eip+0x21c>
  100792:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  100795:	89 c2                	mov    %eax,%edx
  100797:	89 d0                	mov    %edx,%eax
  100799:	01 c0                	add    %eax,%eax
  10079b:	01 d0                	add    %edx,%eax
  10079d:	c1 e0 02             	shl    $0x2,%eax
  1007a0:	89 c2                	mov    %eax,%edx
  1007a2:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1007a5:	01 d0                	add    %edx,%eax
  1007a7:	8b 40 08             	mov    0x8(%eax),%eax
  1007aa:	85 c0                	test   %eax,%eax
  1007ac:	74 99                	je     100747 <debuginfo_eip+0x21c>
    }
    if (lline >= lfile && stabs[lline].n_strx < stabstr_end - stabstr) {
  1007ae:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  1007b1:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  1007b4:	39 c2                	cmp    %eax,%edx
  1007b6:	7c 42                	jl     1007fa <debuginfo_eip+0x2cf>
  1007b8:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  1007bb:	89 c2                	mov    %eax,%edx
  1007bd:	89 d0                	mov    %edx,%eax
  1007bf:	01 c0                	add    %eax,%eax
  1007c1:	01 d0                	add    %edx,%eax
  1007c3:	c1 e0 02             	shl    $0x2,%eax
  1007c6:	89 c2                	mov    %eax,%edx
  1007c8:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1007cb:	01 d0                	add    %edx,%eax
  1007cd:	8b 10                	mov    (%eax),%edx
  1007cf:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1007d2:	2b 45 ec             	sub    -0x14(%ebp),%eax
  1007d5:	39 c2                	cmp    %eax,%edx
  1007d7:	73 21                	jae    1007fa <debuginfo_eip+0x2cf>
        info->eip_file = stabstr + stabs[lline].n_strx;
  1007d9:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  1007dc:	89 c2                	mov    %eax,%edx
  1007de:	89 d0                	mov    %edx,%eax
  1007e0:	01 c0                	add    %eax,%eax
  1007e2:	01 d0                	add    %edx,%eax
  1007e4:	c1 e0 02             	shl    $0x2,%eax
  1007e7:	89 c2                	mov    %eax,%edx
  1007e9:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1007ec:	01 d0                	add    %edx,%eax
  1007ee:	8b 10                	mov    (%eax),%edx
  1007f0:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1007f3:	01 c2                	add    %eax,%edx
  1007f5:	8b 45 0c             	mov    0xc(%ebp),%eax
  1007f8:	89 10                	mov    %edx,(%eax)
    }

    // Set eip_fn_narg to the number of arguments taken by the function,
    // or 0 if there was no containing function.
    if (lfun < rfun) {
  1007fa:	8b 55 dc             	mov    -0x24(%ebp),%edx
  1007fd:	8b 45 d8             	mov    -0x28(%ebp),%eax
  100800:	39 c2                	cmp    %eax,%edx
  100802:	7d 46                	jge    10084a <debuginfo_eip+0x31f>
        for (lline = lfun + 1;
  100804:	8b 45 dc             	mov    -0x24(%ebp),%eax
  100807:	40                   	inc    %eax
  100808:	89 45 d4             	mov    %eax,-0x2c(%ebp)
  10080b:	eb 16                	jmp    100823 <debuginfo_eip+0x2f8>
             lline < rfun && stabs[lline].n_type == N_PSYM;
             lline ++) {
            info->eip_fn_narg ++;
  10080d:	8b 45 0c             	mov    0xc(%ebp),%eax
  100810:	8b 40 14             	mov    0x14(%eax),%eax
  100813:	8d 50 01             	lea    0x1(%eax),%edx
  100816:	8b 45 0c             	mov    0xc(%ebp),%eax
  100819:	89 50 14             	mov    %edx,0x14(%eax)
             lline ++) {
  10081c:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  10081f:	40                   	inc    %eax
  100820:	89 45 d4             	mov    %eax,-0x2c(%ebp)
             lline < rfun && stabs[lline].n_type == N_PSYM;
  100823:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  100826:	8b 45 d8             	mov    -0x28(%ebp),%eax
  100829:	39 c2                	cmp    %eax,%edx
  10082b:	7d 1d                	jge    10084a <debuginfo_eip+0x31f>
  10082d:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  100830:	89 c2                	mov    %eax,%edx
  100832:	89 d0                	mov    %edx,%eax
  100834:	01 c0                	add    %eax,%eax
  100836:	01 d0                	add    %edx,%eax
  100838:	c1 e0 02             	shl    $0x2,%eax
  10083b:	89 c2                	mov    %eax,%edx
  10083d:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100840:	01 d0                	add    %edx,%eax
  100842:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  100846:	3c a0                	cmp    $0xa0,%al
  100848:	74 c3                	je     10080d <debuginfo_eip+0x2e2>
        }
    }
    return 0;
  10084a:	b8 00 00 00 00       	mov    $0x0,%eax
}
  10084f:	89 ec                	mov    %ebp,%esp
  100851:	5d                   	pop    %ebp
  100852:	c3                   	ret    

00100853 <print_kerninfo>:
 * print_kerninfo - print the information about kernel, including the location
 * of kernel entry, the start addresses of data and text segements, the start
 * address of free memory and how many memory that kernel has used.
 * */
void
print_kerninfo(void) {
  100853:	55                   	push   %ebp
  100854:	89 e5                	mov    %esp,%ebp
  100856:	83 ec 18             	sub    $0x18,%esp
    extern char etext[], edata[], end[], kern_init[];
    cprintf("Special kernel symbols:\n");
  100859:	c7 04 24 76 37 10 00 	movl   $0x103776,(%esp)
  100860:	e8 cb fa ff ff       	call   100330 <cprintf>
    cprintf("  entry  0x%08x (phys)\n", kern_init);
  100865:	c7 44 24 04 00 00 10 	movl   $0x100000,0x4(%esp)
  10086c:	00 
  10086d:	c7 04 24 8f 37 10 00 	movl   $0x10378f,(%esp)
  100874:	e8 b7 fa ff ff       	call   100330 <cprintf>
    cprintf("  etext  0x%08x (phys)\n", etext);
  100879:	c7 44 24 04 c0 36 10 	movl   $0x1036c0,0x4(%esp)
  100880:	00 
  100881:	c7 04 24 a7 37 10 00 	movl   $0x1037a7,(%esp)
  100888:	e8 a3 fa ff ff       	call   100330 <cprintf>
    cprintf("  edata  0x%08x (phys)\n", edata);
  10088d:	c7 44 24 04 16 fa 10 	movl   $0x10fa16,0x4(%esp)
  100894:	00 
  100895:	c7 04 24 bf 37 10 00 	movl   $0x1037bf,(%esp)
  10089c:	e8 8f fa ff ff       	call   100330 <cprintf>
    cprintf("  end    0x%08x (phys)\n", end);
  1008a1:	c7 44 24 04 48 0d 11 	movl   $0x110d48,0x4(%esp)
  1008a8:	00 
  1008a9:	c7 04 24 d7 37 10 00 	movl   $0x1037d7,(%esp)
  1008b0:	e8 7b fa ff ff       	call   100330 <cprintf>
    cprintf("Kernel executable memory footprint: %dKB\n", (end - kern_init + 1023)/1024);
  1008b5:	b8 48 0d 11 00       	mov    $0x110d48,%eax
  1008ba:	2d 00 00 10 00       	sub    $0x100000,%eax
  1008bf:	05 ff 03 00 00       	add    $0x3ff,%eax
  1008c4:	8d 90 ff 03 00 00    	lea    0x3ff(%eax),%edx
  1008ca:	85 c0                	test   %eax,%eax
  1008cc:	0f 48 c2             	cmovs  %edx,%eax
  1008cf:	c1 f8 0a             	sar    $0xa,%eax
  1008d2:	89 44 24 04          	mov    %eax,0x4(%esp)
  1008d6:	c7 04 24 f0 37 10 00 	movl   $0x1037f0,(%esp)
  1008dd:	e8 4e fa ff ff       	call   100330 <cprintf>
}
  1008e2:	90                   	nop
  1008e3:	89 ec                	mov    %ebp,%esp
  1008e5:	5d                   	pop    %ebp
  1008e6:	c3                   	ret    

001008e7 <print_debuginfo>:
/* *
 * print_debuginfo - read and print the stat information for the address @eip,
 * and info.eip_fn_addr should be the first address of the related function.
 * */
void
print_debuginfo(uintptr_t eip) {
  1008e7:	55                   	push   %ebp
  1008e8:	89 e5                	mov    %esp,%ebp
  1008ea:	81 ec 48 01 00 00    	sub    $0x148,%esp
    struct eipdebuginfo info;
    if (debuginfo_eip(eip, &info) != 0) {
  1008f0:	8d 45 dc             	lea    -0x24(%ebp),%eax
  1008f3:	89 44 24 04          	mov    %eax,0x4(%esp)
  1008f7:	8b 45 08             	mov    0x8(%ebp),%eax
  1008fa:	89 04 24             	mov    %eax,(%esp)
  1008fd:	e8 29 fc ff ff       	call   10052b <debuginfo_eip>
  100902:	85 c0                	test   %eax,%eax
  100904:	74 15                	je     10091b <print_debuginfo+0x34>
        cprintf("    <unknow>: -- 0x%08x --\n", eip);
  100906:	8b 45 08             	mov    0x8(%ebp),%eax
  100909:	89 44 24 04          	mov    %eax,0x4(%esp)
  10090d:	c7 04 24 1a 38 10 00 	movl   $0x10381a,(%esp)
  100914:	e8 17 fa ff ff       	call   100330 <cprintf>
        }
        fnname[j] = '\0';
        cprintf("    %s:%d: %s+%d\n", info.eip_file, info.eip_line,
                fnname, eip - info.eip_fn_addr);
    }
}
  100919:	eb 6c                	jmp    100987 <print_debuginfo+0xa0>
        for (j = 0; j < info.eip_fn_namelen; j ++) {
  10091b:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  100922:	eb 1b                	jmp    10093f <print_debuginfo+0x58>
            fnname[j] = info.eip_fn_name[j];
  100924:	8b 55 e4             	mov    -0x1c(%ebp),%edx
  100927:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10092a:	01 d0                	add    %edx,%eax
  10092c:	0f b6 10             	movzbl (%eax),%edx
  10092f:	8d 8d dc fe ff ff    	lea    -0x124(%ebp),%ecx
  100935:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100938:	01 c8                	add    %ecx,%eax
  10093a:	88 10                	mov    %dl,(%eax)
        for (j = 0; j < info.eip_fn_namelen; j ++) {
  10093c:	ff 45 f4             	incl   -0xc(%ebp)
  10093f:	8b 45 e8             	mov    -0x18(%ebp),%eax
  100942:	39 45 f4             	cmp    %eax,-0xc(%ebp)
  100945:	7c dd                	jl     100924 <print_debuginfo+0x3d>
        fnname[j] = '\0';
  100947:	8d 95 dc fe ff ff    	lea    -0x124(%ebp),%edx
  10094d:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100950:	01 d0                	add    %edx,%eax
  100952:	c6 00 00             	movb   $0x0,(%eax)
                fnname, eip - info.eip_fn_addr);
  100955:	8b 55 ec             	mov    -0x14(%ebp),%edx
        cprintf("    %s:%d: %s+%d\n", info.eip_file, info.eip_line,
  100958:	8b 45 08             	mov    0x8(%ebp),%eax
  10095b:	29 d0                	sub    %edx,%eax
  10095d:	89 c1                	mov    %eax,%ecx
  10095f:	8b 55 e0             	mov    -0x20(%ebp),%edx
  100962:	8b 45 dc             	mov    -0x24(%ebp),%eax
  100965:	89 4c 24 10          	mov    %ecx,0x10(%esp)
  100969:	8d 8d dc fe ff ff    	lea    -0x124(%ebp),%ecx
  10096f:	89 4c 24 0c          	mov    %ecx,0xc(%esp)
  100973:	89 54 24 08          	mov    %edx,0x8(%esp)
  100977:	89 44 24 04          	mov    %eax,0x4(%esp)
  10097b:	c7 04 24 36 38 10 00 	movl   $0x103836,(%esp)
  100982:	e8 a9 f9 ff ff       	call   100330 <cprintf>
}
  100987:	90                   	nop
  100988:	89 ec                	mov    %ebp,%esp
  10098a:	5d                   	pop    %ebp
  10098b:	c3                   	ret    

0010098c <read_eip>:

static __noinline uint32_t
read_eip(void) {
  10098c:	55                   	push   %ebp
  10098d:	89 e5                	mov    %esp,%ebp
  10098f:	83 ec 10             	sub    $0x10,%esp
    uint32_t eip;
    asm volatile("movl 4(%%ebp), %0" : "=r" (eip));
  100992:	8b 45 04             	mov    0x4(%ebp),%eax
  100995:	89 45 fc             	mov    %eax,-0x4(%ebp)
    return eip;
  100998:	8b 45 fc             	mov    -0x4(%ebp),%eax
}
  10099b:	89 ec                	mov    %ebp,%esp
  10099d:	5d                   	pop    %ebp
  10099e:	c3                   	ret    

0010099f <print_stackframe>:
 *
 * Note that, the length of ebp-chain is limited. In boot/bootasm.S, before jumping
 * to the kernel entry, the value of ebp has been set to zero, that's the boundary.
 * */
void
print_stackframe(void) {
  10099f:	55                   	push   %ebp
  1009a0:	89 e5                	mov    %esp,%ebp
  1009a2:	83 ec 48             	sub    $0x48,%esp
}

static inline uint32_t
read_ebp(void) {
    uint32_t ebp;
    asm volatile ("movl %%ebp, %0" : "=r" (ebp));
  1009a5:	89 e8                	mov    %ebp,%eax
  1009a7:	89 45 e4             	mov    %eax,-0x1c(%ebp)
    return ebp;
  1009aa:	8b 45 e4             	mov    -0x1c(%ebp),%eax
      *    (3.4) call print_debuginfo(eip-1) to print the C calling function name and line number, etc.
      *    (3.5) popup a calling stackframe
      *           NOTICE: the calling funciton's return addr eip  = ss:[ebp+4]
      *                   the calling funciton's ebp = ss:[ebp]
      */
    uint32_t ebp = read_ebp(), eip = read_eip();
  1009ad:	89 45 f4             	mov    %eax,-0xc(%ebp)
  1009b0:	e8 d7 ff ff ff       	call   10098c <read_eip>
  1009b5:	89 45 f0             	mov    %eax,-0x10(%ebp)
    for (int i = 0; i < STACKFRAME_DEPTH; i++){
  1009b8:	c7 45 ec 00 00 00 00 	movl   $0x0,-0x14(%ebp)
  1009bf:	e9 8c 00 00 00       	jmp    100a50 <print_stackframe+0xb1>
        cprintf("ebp:0x%08x eip:0x%08x args: ", ebp, eip);
  1009c4:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1009c7:	89 44 24 08          	mov    %eax,0x8(%esp)
  1009cb:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1009ce:	89 44 24 04          	mov    %eax,0x4(%esp)
  1009d2:	c7 04 24 48 38 10 00 	movl   $0x103848,(%esp)
  1009d9:	e8 52 f9 ff ff       	call   100330 <cprintf>
        uint32_t arg[4];
        for(int j = 0; j < 4; j++){
  1009de:	c7 45 e8 00 00 00 00 	movl   $0x0,-0x18(%ebp)
  1009e5:	eb 35                	jmp    100a1c <print_stackframe+0x7d>
            arg[j] = *((uint32_t *)ebp + 2 + j);
  1009e7:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1009ea:	8d 14 85 00 00 00 00 	lea    0x0(,%eax,4),%edx
  1009f1:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1009f4:	01 d0                	add    %edx,%eax
  1009f6:	83 c0 08             	add    $0x8,%eax
  1009f9:	8b 10                	mov    (%eax),%edx
  1009fb:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1009fe:	89 54 85 d4          	mov    %edx,-0x2c(%ebp,%eax,4)
            cprintf("0x%08x ", arg[j]);
  100a02:	8b 45 e8             	mov    -0x18(%ebp),%eax
  100a05:	8b 44 85 d4          	mov    -0x2c(%ebp,%eax,4),%eax
  100a09:	89 44 24 04          	mov    %eax,0x4(%esp)
  100a0d:	c7 04 24 65 38 10 00 	movl   $0x103865,(%esp)
  100a14:	e8 17 f9 ff ff       	call   100330 <cprintf>
        for(int j = 0; j < 4; j++){
  100a19:	ff 45 e8             	incl   -0x18(%ebp)
  100a1c:	83 7d e8 03          	cmpl   $0x3,-0x18(%ebp)
  100a20:	7e c5                	jle    1009e7 <print_stackframe+0x48>
        }
        cprintf("\n");
  100a22:	c7 04 24 6d 38 10 00 	movl   $0x10386d,(%esp)
  100a29:	e8 02 f9 ff ff       	call   100330 <cprintf>
        print_debuginfo(eip - 1);
  100a2e:	8b 45 f0             	mov    -0x10(%ebp),%eax
  100a31:	48                   	dec    %eax
  100a32:	89 04 24             	mov    %eax,(%esp)
  100a35:	e8 ad fe ff ff       	call   1008e7 <print_debuginfo>
        eip = *((uint32_t *)ebp + 1);
  100a3a:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100a3d:	83 c0 04             	add    $0x4,%eax
  100a40:	8b 00                	mov    (%eax),%eax
  100a42:	89 45 f0             	mov    %eax,-0x10(%ebp)
        ebp = *((uint32_t *)ebp);
  100a45:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100a48:	8b 00                	mov    (%eax),%eax
  100a4a:	89 45 f4             	mov    %eax,-0xc(%ebp)
    for (int i = 0; i < STACKFRAME_DEPTH; i++){
  100a4d:	ff 45 ec             	incl   -0x14(%ebp)
  100a50:	83 7d ec 13          	cmpl   $0x13,-0x14(%ebp)
  100a54:	0f 8e 6a ff ff ff    	jle    1009c4 <print_stackframe+0x25>
    }
}
  100a5a:	90                   	nop
  100a5b:	90                   	nop
  100a5c:	89 ec                	mov    %ebp,%esp
  100a5e:	5d                   	pop    %ebp
  100a5f:	c3                   	ret    

00100a60 <parse>:
#define MAXARGS         16
#define WHITESPACE      " \t\n\r"

/* parse - parse the command buffer into whitespace-separated arguments */
static int
parse(char *buf, char **argv) {
  100a60:	55                   	push   %ebp
  100a61:	89 e5                	mov    %esp,%ebp
  100a63:	83 ec 28             	sub    $0x28,%esp
    int argc = 0;
  100a66:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    while (1) {
        // find global whitespace
        while (*buf != '\0' && strchr(WHITESPACE, *buf) != NULL) {
  100a6d:	eb 0c                	jmp    100a7b <parse+0x1b>
            *buf ++ = '\0';
  100a6f:	8b 45 08             	mov    0x8(%ebp),%eax
  100a72:	8d 50 01             	lea    0x1(%eax),%edx
  100a75:	89 55 08             	mov    %edx,0x8(%ebp)
  100a78:	c6 00 00             	movb   $0x0,(%eax)
        while (*buf != '\0' && strchr(WHITESPACE, *buf) != NULL) {
  100a7b:	8b 45 08             	mov    0x8(%ebp),%eax
  100a7e:	0f b6 00             	movzbl (%eax),%eax
  100a81:	84 c0                	test   %al,%al
  100a83:	74 1d                	je     100aa2 <parse+0x42>
  100a85:	8b 45 08             	mov    0x8(%ebp),%eax
  100a88:	0f b6 00             	movzbl (%eax),%eax
  100a8b:	0f be c0             	movsbl %al,%eax
  100a8e:	89 44 24 04          	mov    %eax,0x4(%esp)
  100a92:	c7 04 24 f0 38 10 00 	movl   $0x1038f0,(%esp)
  100a99:	e8 da 28 00 00       	call   103378 <strchr>
  100a9e:	85 c0                	test   %eax,%eax
  100aa0:	75 cd                	jne    100a6f <parse+0xf>
        }
        if (*buf == '\0') {
  100aa2:	8b 45 08             	mov    0x8(%ebp),%eax
  100aa5:	0f b6 00             	movzbl (%eax),%eax
  100aa8:	84 c0                	test   %al,%al
  100aaa:	74 65                	je     100b11 <parse+0xb1>
            break;
        }

        // save and scan past next arg
        if (argc == MAXARGS - 1) {
  100aac:	83 7d f4 0f          	cmpl   $0xf,-0xc(%ebp)
  100ab0:	75 14                	jne    100ac6 <parse+0x66>
            cprintf("Too many arguments (max %d).\n", MAXARGS);
  100ab2:	c7 44 24 04 10 00 00 	movl   $0x10,0x4(%esp)
  100ab9:	00 
  100aba:	c7 04 24 f5 38 10 00 	movl   $0x1038f5,(%esp)
  100ac1:	e8 6a f8 ff ff       	call   100330 <cprintf>
        }
        argv[argc ++] = buf;
  100ac6:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100ac9:	8d 50 01             	lea    0x1(%eax),%edx
  100acc:	89 55 f4             	mov    %edx,-0xc(%ebp)
  100acf:	8d 14 85 00 00 00 00 	lea    0x0(,%eax,4),%edx
  100ad6:	8b 45 0c             	mov    0xc(%ebp),%eax
  100ad9:	01 c2                	add    %eax,%edx
  100adb:	8b 45 08             	mov    0x8(%ebp),%eax
  100ade:	89 02                	mov    %eax,(%edx)
        while (*buf != '\0' && strchr(WHITESPACE, *buf) == NULL) {
  100ae0:	eb 03                	jmp    100ae5 <parse+0x85>
            buf ++;
  100ae2:	ff 45 08             	incl   0x8(%ebp)
        while (*buf != '\0' && strchr(WHITESPACE, *buf) == NULL) {
  100ae5:	8b 45 08             	mov    0x8(%ebp),%eax
  100ae8:	0f b6 00             	movzbl (%eax),%eax
  100aeb:	84 c0                	test   %al,%al
  100aed:	74 8c                	je     100a7b <parse+0x1b>
  100aef:	8b 45 08             	mov    0x8(%ebp),%eax
  100af2:	0f b6 00             	movzbl (%eax),%eax
  100af5:	0f be c0             	movsbl %al,%eax
  100af8:	89 44 24 04          	mov    %eax,0x4(%esp)
  100afc:	c7 04 24 f0 38 10 00 	movl   $0x1038f0,(%esp)
  100b03:	e8 70 28 00 00       	call   103378 <strchr>
  100b08:	85 c0                	test   %eax,%eax
  100b0a:	74 d6                	je     100ae2 <parse+0x82>
        while (*buf != '\0' && strchr(WHITESPACE, *buf) != NULL) {
  100b0c:	e9 6a ff ff ff       	jmp    100a7b <parse+0x1b>
            break;
  100b11:	90                   	nop
        }
    }
    return argc;
  100b12:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  100b15:	89 ec                	mov    %ebp,%esp
  100b17:	5d                   	pop    %ebp
  100b18:	c3                   	ret    

00100b19 <runcmd>:
/* *
 * runcmd - parse the input string, split it into separated arguments
 * and then lookup and invoke some related commands/
 * */
static int
runcmd(char *buf, struct trapframe *tf) {
  100b19:	55                   	push   %ebp
  100b1a:	89 e5                	mov    %esp,%ebp
  100b1c:	83 ec 68             	sub    $0x68,%esp
  100b1f:	89 5d fc             	mov    %ebx,-0x4(%ebp)
    char *argv[MAXARGS];
    int argc = parse(buf, argv);
  100b22:	8d 45 b0             	lea    -0x50(%ebp),%eax
  100b25:	89 44 24 04          	mov    %eax,0x4(%esp)
  100b29:	8b 45 08             	mov    0x8(%ebp),%eax
  100b2c:	89 04 24             	mov    %eax,(%esp)
  100b2f:	e8 2c ff ff ff       	call   100a60 <parse>
  100b34:	89 45 f0             	mov    %eax,-0x10(%ebp)
    if (argc == 0) {
  100b37:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  100b3b:	75 0a                	jne    100b47 <runcmd+0x2e>
        return 0;
  100b3d:	b8 00 00 00 00       	mov    $0x0,%eax
  100b42:	e9 83 00 00 00       	jmp    100bca <runcmd+0xb1>
    }
    int i;
    for (i = 0; i < NCOMMANDS; i ++) {
  100b47:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  100b4e:	eb 5a                	jmp    100baa <runcmd+0x91>
        if (strcmp(commands[i].name, argv[0]) == 0) {
  100b50:	8b 55 b0             	mov    -0x50(%ebp),%edx
  100b53:	8b 4d f4             	mov    -0xc(%ebp),%ecx
  100b56:	89 c8                	mov    %ecx,%eax
  100b58:	01 c0                	add    %eax,%eax
  100b5a:	01 c8                	add    %ecx,%eax
  100b5c:	c1 e0 02             	shl    $0x2,%eax
  100b5f:	05 00 f0 10 00       	add    $0x10f000,%eax
  100b64:	8b 00                	mov    (%eax),%eax
  100b66:	89 54 24 04          	mov    %edx,0x4(%esp)
  100b6a:	89 04 24             	mov    %eax,(%esp)
  100b6d:	e8 6a 27 00 00       	call   1032dc <strcmp>
  100b72:	85 c0                	test   %eax,%eax
  100b74:	75 31                	jne    100ba7 <runcmd+0x8e>
            return commands[i].func(argc - 1, argv + 1, tf);
  100b76:	8b 55 f4             	mov    -0xc(%ebp),%edx
  100b79:	89 d0                	mov    %edx,%eax
  100b7b:	01 c0                	add    %eax,%eax
  100b7d:	01 d0                	add    %edx,%eax
  100b7f:	c1 e0 02             	shl    $0x2,%eax
  100b82:	05 08 f0 10 00       	add    $0x10f008,%eax
  100b87:	8b 10                	mov    (%eax),%edx
  100b89:	8d 45 b0             	lea    -0x50(%ebp),%eax
  100b8c:	83 c0 04             	add    $0x4,%eax
  100b8f:	8b 4d f0             	mov    -0x10(%ebp),%ecx
  100b92:	8d 59 ff             	lea    -0x1(%ecx),%ebx
  100b95:	8b 4d 0c             	mov    0xc(%ebp),%ecx
  100b98:	89 4c 24 08          	mov    %ecx,0x8(%esp)
  100b9c:	89 44 24 04          	mov    %eax,0x4(%esp)
  100ba0:	89 1c 24             	mov    %ebx,(%esp)
  100ba3:	ff d2                	call   *%edx
  100ba5:	eb 23                	jmp    100bca <runcmd+0xb1>
    for (i = 0; i < NCOMMANDS; i ++) {
  100ba7:	ff 45 f4             	incl   -0xc(%ebp)
  100baa:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100bad:	83 f8 02             	cmp    $0x2,%eax
  100bb0:	76 9e                	jbe    100b50 <runcmd+0x37>
        }
    }
    cprintf("Unknown command '%s'\n", argv[0]);
  100bb2:	8b 45 b0             	mov    -0x50(%ebp),%eax
  100bb5:	89 44 24 04          	mov    %eax,0x4(%esp)
  100bb9:	c7 04 24 13 39 10 00 	movl   $0x103913,(%esp)
  100bc0:	e8 6b f7 ff ff       	call   100330 <cprintf>
    return 0;
  100bc5:	b8 00 00 00 00       	mov    $0x0,%eax
}
  100bca:	8b 5d fc             	mov    -0x4(%ebp),%ebx
  100bcd:	89 ec                	mov    %ebp,%esp
  100bcf:	5d                   	pop    %ebp
  100bd0:	c3                   	ret    

00100bd1 <kmonitor>:

/***** Implementations of basic kernel monitor commands *****/

void
kmonitor(struct trapframe *tf) {
  100bd1:	55                   	push   %ebp
  100bd2:	89 e5                	mov    %esp,%ebp
  100bd4:	83 ec 28             	sub    $0x28,%esp
    cprintf("Welcome to the kernel debug monitor!!\n");
  100bd7:	c7 04 24 2c 39 10 00 	movl   $0x10392c,(%esp)
  100bde:	e8 4d f7 ff ff       	call   100330 <cprintf>
    cprintf("Type 'help' for a list of commands.\n");
  100be3:	c7 04 24 54 39 10 00 	movl   $0x103954,(%esp)
  100bea:	e8 41 f7 ff ff       	call   100330 <cprintf>

    if (tf != NULL) {
  100bef:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
  100bf3:	74 0b                	je     100c00 <kmonitor+0x2f>
        print_trapframe(tf);
  100bf5:	8b 45 08             	mov    0x8(%ebp),%eax
  100bf8:	89 04 24             	mov    %eax,(%esp)
  100bfb:	e8 67 0e 00 00       	call   101a67 <print_trapframe>
    }

    char *buf;
    while (1) {
        if ((buf = readline("K> ")) != NULL) {
  100c00:	c7 04 24 79 39 10 00 	movl   $0x103979,(%esp)
  100c07:	e8 15 f6 ff ff       	call   100221 <readline>
  100c0c:	89 45 f4             	mov    %eax,-0xc(%ebp)
  100c0f:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  100c13:	74 eb                	je     100c00 <kmonitor+0x2f>
            if (runcmd(buf, tf) < 0) {
  100c15:	8b 45 08             	mov    0x8(%ebp),%eax
  100c18:	89 44 24 04          	mov    %eax,0x4(%esp)
  100c1c:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100c1f:	89 04 24             	mov    %eax,(%esp)
  100c22:	e8 f2 fe ff ff       	call   100b19 <runcmd>
  100c27:	85 c0                	test   %eax,%eax
  100c29:	78 02                	js     100c2d <kmonitor+0x5c>
        if ((buf = readline("K> ")) != NULL) {
  100c2b:	eb d3                	jmp    100c00 <kmonitor+0x2f>
                break;
  100c2d:	90                   	nop
            }
        }
    }
}
  100c2e:	90                   	nop
  100c2f:	89 ec                	mov    %ebp,%esp
  100c31:	5d                   	pop    %ebp
  100c32:	c3                   	ret    

00100c33 <mon_help>:

/* mon_help - print the information about mon_* functions */
int
mon_help(int argc, char **argv, struct trapframe *tf) {
  100c33:	55                   	push   %ebp
  100c34:	89 e5                	mov    %esp,%ebp
  100c36:	83 ec 28             	sub    $0x28,%esp
    int i;
    for (i = 0; i < NCOMMANDS; i ++) {
  100c39:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  100c40:	eb 3d                	jmp    100c7f <mon_help+0x4c>
        cprintf("%s - %s\n", commands[i].name, commands[i].desc);
  100c42:	8b 55 f4             	mov    -0xc(%ebp),%edx
  100c45:	89 d0                	mov    %edx,%eax
  100c47:	01 c0                	add    %eax,%eax
  100c49:	01 d0                	add    %edx,%eax
  100c4b:	c1 e0 02             	shl    $0x2,%eax
  100c4e:	05 04 f0 10 00       	add    $0x10f004,%eax
  100c53:	8b 10                	mov    (%eax),%edx
  100c55:	8b 4d f4             	mov    -0xc(%ebp),%ecx
  100c58:	89 c8                	mov    %ecx,%eax
  100c5a:	01 c0                	add    %eax,%eax
  100c5c:	01 c8                	add    %ecx,%eax
  100c5e:	c1 e0 02             	shl    $0x2,%eax
  100c61:	05 00 f0 10 00       	add    $0x10f000,%eax
  100c66:	8b 00                	mov    (%eax),%eax
  100c68:	89 54 24 08          	mov    %edx,0x8(%esp)
  100c6c:	89 44 24 04          	mov    %eax,0x4(%esp)
  100c70:	c7 04 24 7d 39 10 00 	movl   $0x10397d,(%esp)
  100c77:	e8 b4 f6 ff ff       	call   100330 <cprintf>
    for (i = 0; i < NCOMMANDS; i ++) {
  100c7c:	ff 45 f4             	incl   -0xc(%ebp)
  100c7f:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100c82:	83 f8 02             	cmp    $0x2,%eax
  100c85:	76 bb                	jbe    100c42 <mon_help+0xf>
    }
    return 0;
  100c87:	b8 00 00 00 00       	mov    $0x0,%eax
}
  100c8c:	89 ec                	mov    %ebp,%esp
  100c8e:	5d                   	pop    %ebp
  100c8f:	c3                   	ret    

00100c90 <mon_kerninfo>:
/* *
 * mon_kerninfo - call print_kerninfo in kern/debug/kdebug.c to
 * print the memory occupancy in kernel.
 * */
int
mon_kerninfo(int argc, char **argv, struct trapframe *tf) {
  100c90:	55                   	push   %ebp
  100c91:	89 e5                	mov    %esp,%ebp
  100c93:	83 ec 08             	sub    $0x8,%esp
    print_kerninfo();
  100c96:	e8 b8 fb ff ff       	call   100853 <print_kerninfo>
    return 0;
  100c9b:	b8 00 00 00 00       	mov    $0x0,%eax
}
  100ca0:	89 ec                	mov    %ebp,%esp
  100ca2:	5d                   	pop    %ebp
  100ca3:	c3                   	ret    

00100ca4 <mon_backtrace>:
/* *
 * mon_backtrace - call print_stackframe in kern/debug/kdebug.c to
 * print a backtrace of the stack.
 * */
int
mon_backtrace(int argc, char **argv, struct trapframe *tf) {
  100ca4:	55                   	push   %ebp
  100ca5:	89 e5                	mov    %esp,%ebp
  100ca7:	83 ec 08             	sub    $0x8,%esp
    print_stackframe();
  100caa:	e8 f0 fc ff ff       	call   10099f <print_stackframe>
    return 0;
  100caf:	b8 00 00 00 00       	mov    $0x0,%eax
}
  100cb4:	89 ec                	mov    %ebp,%esp
  100cb6:	5d                   	pop    %ebp
  100cb7:	c3                   	ret    

00100cb8 <__panic>:
/* *
 * __panic - __panic is called on unresolvable fatal errors. it prints
 * "panic: 'message'", and then enters the kernel monitor.
 * */
void
__panic(const char *file, int line, const char *fmt, ...) {
  100cb8:	55                   	push   %ebp
  100cb9:	89 e5                	mov    %esp,%ebp
  100cbb:	83 ec 28             	sub    $0x28,%esp
    if (is_panic) {
  100cbe:	a1 40 fe 10 00       	mov    0x10fe40,%eax
  100cc3:	85 c0                	test   %eax,%eax
  100cc5:	75 5b                	jne    100d22 <__panic+0x6a>
        goto panic_dead;
    }
    is_panic = 1;
  100cc7:	c7 05 40 fe 10 00 01 	movl   $0x1,0x10fe40
  100cce:	00 00 00 

    // print the 'message'
    va_list ap;
    va_start(ap, fmt);
  100cd1:	8d 45 14             	lea    0x14(%ebp),%eax
  100cd4:	89 45 f4             	mov    %eax,-0xc(%ebp)
    cprintf("kernel panic at %s:%d:\n    ", file, line);
  100cd7:	8b 45 0c             	mov    0xc(%ebp),%eax
  100cda:	89 44 24 08          	mov    %eax,0x8(%esp)
  100cde:	8b 45 08             	mov    0x8(%ebp),%eax
  100ce1:	89 44 24 04          	mov    %eax,0x4(%esp)
  100ce5:	c7 04 24 86 39 10 00 	movl   $0x103986,(%esp)
  100cec:	e8 3f f6 ff ff       	call   100330 <cprintf>
    vcprintf(fmt, ap);
  100cf1:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100cf4:	89 44 24 04          	mov    %eax,0x4(%esp)
  100cf8:	8b 45 10             	mov    0x10(%ebp),%eax
  100cfb:	89 04 24             	mov    %eax,(%esp)
  100cfe:	e8 f8 f5 ff ff       	call   1002fb <vcprintf>
    cprintf("\n");
  100d03:	c7 04 24 a2 39 10 00 	movl   $0x1039a2,(%esp)
  100d0a:	e8 21 f6 ff ff       	call   100330 <cprintf>
    
    cprintf("stack trackback:\n");
  100d0f:	c7 04 24 a4 39 10 00 	movl   $0x1039a4,(%esp)
  100d16:	e8 15 f6 ff ff       	call   100330 <cprintf>
    print_stackframe();
  100d1b:	e8 7f fc ff ff       	call   10099f <print_stackframe>
  100d20:	eb 01                	jmp    100d23 <__panic+0x6b>
        goto panic_dead;
  100d22:	90                   	nop
    
    va_end(ap);

panic_dead:
    intr_disable();
  100d23:	e8 81 09 00 00       	call   1016a9 <intr_disable>
    while (1) {
        kmonitor(NULL);
  100d28:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  100d2f:	e8 9d fe ff ff       	call   100bd1 <kmonitor>
  100d34:	eb f2                	jmp    100d28 <__panic+0x70>

00100d36 <__warn>:
    }
}

/* __warn - like panic, but don't */
void
__warn(const char *file, int line, const char *fmt, ...) {
  100d36:	55                   	push   %ebp
  100d37:	89 e5                	mov    %esp,%ebp
  100d39:	83 ec 28             	sub    $0x28,%esp
    va_list ap;
    va_start(ap, fmt);
  100d3c:	8d 45 14             	lea    0x14(%ebp),%eax
  100d3f:	89 45 f4             	mov    %eax,-0xc(%ebp)
    cprintf("kernel warning at %s:%d:\n    ", file, line);
  100d42:	8b 45 0c             	mov    0xc(%ebp),%eax
  100d45:	89 44 24 08          	mov    %eax,0x8(%esp)
  100d49:	8b 45 08             	mov    0x8(%ebp),%eax
  100d4c:	89 44 24 04          	mov    %eax,0x4(%esp)
  100d50:	c7 04 24 b6 39 10 00 	movl   $0x1039b6,(%esp)
  100d57:	e8 d4 f5 ff ff       	call   100330 <cprintf>
    vcprintf(fmt, ap);
  100d5c:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100d5f:	89 44 24 04          	mov    %eax,0x4(%esp)
  100d63:	8b 45 10             	mov    0x10(%ebp),%eax
  100d66:	89 04 24             	mov    %eax,(%esp)
  100d69:	e8 8d f5 ff ff       	call   1002fb <vcprintf>
    cprintf("\n");
  100d6e:	c7 04 24 a2 39 10 00 	movl   $0x1039a2,(%esp)
  100d75:	e8 b6 f5 ff ff       	call   100330 <cprintf>
    va_end(ap);
}
  100d7a:	90                   	nop
  100d7b:	89 ec                	mov    %ebp,%esp
  100d7d:	5d                   	pop    %ebp
  100d7e:	c3                   	ret    

00100d7f <is_kernel_panic>:

bool
is_kernel_panic(void) {
  100d7f:	55                   	push   %ebp
  100d80:	89 e5                	mov    %esp,%ebp
    return is_panic;
  100d82:	a1 40 fe 10 00       	mov    0x10fe40,%eax
}
  100d87:	5d                   	pop    %ebp
  100d88:	c3                   	ret    

00100d89 <clock_init>:
/* *
 * clock_init - initialize 8253 clock to interrupt 100 times per second,
 * and then enable IRQ_TIMER.
 * */
void
clock_init(void) {
  100d89:	55                   	push   %ebp
  100d8a:	89 e5                	mov    %esp,%ebp
  100d8c:	83 ec 28             	sub    $0x28,%esp
  100d8f:	66 c7 45 ee 43 00    	movw   $0x43,-0x12(%ebp)
  100d95:	c6 45 ed 34          	movb   $0x34,-0x13(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100d99:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  100d9d:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  100da1:	ee                   	out    %al,(%dx)
}
  100da2:	90                   	nop
  100da3:	66 c7 45 f2 40 00    	movw   $0x40,-0xe(%ebp)
  100da9:	c6 45 f1 9c          	movb   $0x9c,-0xf(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100dad:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  100db1:	0f b7 55 f2          	movzwl -0xe(%ebp),%edx
  100db5:	ee                   	out    %al,(%dx)
}
  100db6:	90                   	nop
  100db7:	66 c7 45 f6 40 00    	movw   $0x40,-0xa(%ebp)
  100dbd:	c6 45 f5 2e          	movb   $0x2e,-0xb(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100dc1:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
  100dc5:	0f b7 55 f6          	movzwl -0xa(%ebp),%edx
  100dc9:	ee                   	out    %al,(%dx)
}
  100dca:	90                   	nop
    outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT);
    outb(IO_TIMER1, TIMER_DIV(100) % 256);
    outb(IO_TIMER1, TIMER_DIV(100) / 256);

    // initialize time counter 'ticks' to zero
    ticks = 0;
  100dcb:	c7 05 44 fe 10 00 00 	movl   $0x0,0x10fe44
  100dd2:	00 00 00 

    cprintf("++ setup timer interrupts\n");
  100dd5:	c7 04 24 d4 39 10 00 	movl   $0x1039d4,(%esp)
  100ddc:	e8 4f f5 ff ff       	call   100330 <cprintf>
    pic_enable(IRQ_TIMER);
  100de1:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  100de8:	e8 21 09 00 00       	call   10170e <pic_enable>
}
  100ded:	90                   	nop
  100dee:	89 ec                	mov    %ebp,%esp
  100df0:	5d                   	pop    %ebp
  100df1:	c3                   	ret    

00100df2 <delay>:
#include <picirq.h>
#include <trap.h>

/* stupid I/O delay routine necessitated by historical PC design flaws */
static void
delay(void) {
  100df2:	55                   	push   %ebp
  100df3:	89 e5                	mov    %esp,%ebp
  100df5:	83 ec 10             	sub    $0x10,%esp
  100df8:	66 c7 45 f2 84 00    	movw   $0x84,-0xe(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  100dfe:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
  100e02:	89 c2                	mov    %eax,%edx
  100e04:	ec                   	in     (%dx),%al
  100e05:	88 45 f1             	mov    %al,-0xf(%ebp)
  100e08:	66 c7 45 f6 84 00    	movw   $0x84,-0xa(%ebp)
  100e0e:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  100e12:	89 c2                	mov    %eax,%edx
  100e14:	ec                   	in     (%dx),%al
  100e15:	88 45 f5             	mov    %al,-0xb(%ebp)
  100e18:	66 c7 45 fa 84 00    	movw   $0x84,-0x6(%ebp)
  100e1e:	0f b7 45 fa          	movzwl -0x6(%ebp),%eax
  100e22:	89 c2                	mov    %eax,%edx
  100e24:	ec                   	in     (%dx),%al
  100e25:	88 45 f9             	mov    %al,-0x7(%ebp)
  100e28:	66 c7 45 fe 84 00    	movw   $0x84,-0x2(%ebp)
  100e2e:	0f b7 45 fe          	movzwl -0x2(%ebp),%eax
  100e32:	89 c2                	mov    %eax,%edx
  100e34:	ec                   	in     (%dx),%al
  100e35:	88 45 fd             	mov    %al,-0x3(%ebp)
    inb(0x84);
    inb(0x84);
    inb(0x84);
    inb(0x84);
}
  100e38:	90                   	nop
  100e39:	89 ec                	mov    %ebp,%esp
  100e3b:	5d                   	pop    %ebp
  100e3c:	c3                   	ret    

00100e3d <cga_init>:
//    -- 数据寄存器 映射 到 端口 0x3D5或0x3B5 
//    -- 索引寄存器 0x3D4或0x3B4,决定在数据寄存器中的数据表示什么。

/* TEXT-mode CGA/VGA display output */
static void
cga_init(void) {
  100e3d:	55                   	push   %ebp
  100e3e:	89 e5                	mov    %esp,%ebp
  100e40:	83 ec 20             	sub    $0x20,%esp
    volatile uint16_t *cp = (uint16_t *)CGA_BUF;   //CGA_BUF: 0xB8000 (彩色显示的显存物理基址)
  100e43:	c7 45 fc 00 80 0b 00 	movl   $0xb8000,-0x4(%ebp)
    uint16_t was = *cp;                                            //保存当前显存0xB8000处的值
  100e4a:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100e4d:	0f b7 00             	movzwl (%eax),%eax
  100e50:	66 89 45 fa          	mov    %ax,-0x6(%ebp)
    *cp = (uint16_t) 0xA55A;                                   // 给这个地址随便写个值，看看能否再读出同样的值
  100e54:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100e57:	66 c7 00 5a a5       	movw   $0xa55a,(%eax)
    if (*cp != 0xA55A) {                                            // 如果读不出来，说明没有这块显存，即是单显配置
  100e5c:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100e5f:	0f b7 00             	movzwl (%eax),%eax
  100e62:	0f b7 c0             	movzwl %ax,%eax
  100e65:	3d 5a a5 00 00       	cmp    $0xa55a,%eax
  100e6a:	74 12                	je     100e7e <cga_init+0x41>
        cp = (uint16_t*)MONO_BUF;                         //设置为单显的显存基址 MONO_BUF： 0xB0000
  100e6c:	c7 45 fc 00 00 0b 00 	movl   $0xb0000,-0x4(%ebp)
        addr_6845 = MONO_BASE;                           //设置为单显控制的IO地址，MONO_BASE: 0x3B4
  100e73:	66 c7 05 66 fe 10 00 	movw   $0x3b4,0x10fe66
  100e7a:	b4 03 
  100e7c:	eb 13                	jmp    100e91 <cga_init+0x54>
    } else {                                                                // 如果读出来了，有这块显存，即是彩显配置
        *cp = was;                                                      //还原原来显存位置的值
  100e7e:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100e81:	0f b7 55 fa          	movzwl -0x6(%ebp),%edx
  100e85:	66 89 10             	mov    %dx,(%eax)
        addr_6845 = CGA_BASE;                               // 设置为彩显控制的IO地址，CGA_BASE: 0x3D4 
  100e88:	66 c7 05 66 fe 10 00 	movw   $0x3d4,0x10fe66
  100e8f:	d4 03 
    // Extract cursor location
    // 6845索引寄存器的index 0x0E（及十进制的14）== 光标位置(高位)
    // 6845索引寄存器的index 0x0F（及十进制的15）== 光标位置(低位)
    // 6845 reg 15 : Cursor Address (Low Byte)
    uint32_t pos;
    outb(addr_6845, 14);                                        
  100e91:	0f b7 05 66 fe 10 00 	movzwl 0x10fe66,%eax
  100e98:	66 89 45 e6          	mov    %ax,-0x1a(%ebp)
  100e9c:	c6 45 e5 0e          	movb   $0xe,-0x1b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100ea0:	0f b6 45 e5          	movzbl -0x1b(%ebp),%eax
  100ea4:	0f b7 55 e6          	movzwl -0x1a(%ebp),%edx
  100ea8:	ee                   	out    %al,(%dx)
}
  100ea9:	90                   	nop
    pos = inb(addr_6845 + 1) << 8;                       //读出了光标位置(高位)
  100eaa:	0f b7 05 66 fe 10 00 	movzwl 0x10fe66,%eax
  100eb1:	40                   	inc    %eax
  100eb2:	0f b7 c0             	movzwl %ax,%eax
  100eb5:	66 89 45 ea          	mov    %ax,-0x16(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  100eb9:	0f b7 45 ea          	movzwl -0x16(%ebp),%eax
  100ebd:	89 c2                	mov    %eax,%edx
  100ebf:	ec                   	in     (%dx),%al
  100ec0:	88 45 e9             	mov    %al,-0x17(%ebp)
    return data;
  100ec3:	0f b6 45 e9          	movzbl -0x17(%ebp),%eax
  100ec7:	0f b6 c0             	movzbl %al,%eax
  100eca:	c1 e0 08             	shl    $0x8,%eax
  100ecd:	89 45 f4             	mov    %eax,-0xc(%ebp)
    outb(addr_6845, 15);
  100ed0:	0f b7 05 66 fe 10 00 	movzwl 0x10fe66,%eax
  100ed7:	66 89 45 ee          	mov    %ax,-0x12(%ebp)
  100edb:	c6 45 ed 0f          	movb   $0xf,-0x13(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100edf:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  100ee3:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  100ee7:	ee                   	out    %al,(%dx)
}
  100ee8:	90                   	nop
    pos |= inb(addr_6845 + 1);                             //读出了光标位置(低位)
  100ee9:	0f b7 05 66 fe 10 00 	movzwl 0x10fe66,%eax
  100ef0:	40                   	inc    %eax
  100ef1:	0f b7 c0             	movzwl %ax,%eax
  100ef4:	66 89 45 f2          	mov    %ax,-0xe(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  100ef8:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
  100efc:	89 c2                	mov    %eax,%edx
  100efe:	ec                   	in     (%dx),%al
  100eff:	88 45 f1             	mov    %al,-0xf(%ebp)
    return data;
  100f02:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  100f06:	0f b6 c0             	movzbl %al,%eax
  100f09:	09 45 f4             	or     %eax,-0xc(%ebp)

    crt_buf = (uint16_t*) cp;                                  //crt_buf是CGA显存起始地址
  100f0c:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100f0f:	a3 60 fe 10 00       	mov    %eax,0x10fe60
    crt_pos = pos;                                                  //crt_pos是CGA当前光标位置
  100f14:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100f17:	0f b7 c0             	movzwl %ax,%eax
  100f1a:	66 a3 64 fe 10 00    	mov    %ax,0x10fe64
}
  100f20:	90                   	nop
  100f21:	89 ec                	mov    %ebp,%esp
  100f23:	5d                   	pop    %ebp
  100f24:	c3                   	ret    

00100f25 <serial_init>:

static bool serial_exists = 0;

static void
serial_init(void) {
  100f25:	55                   	push   %ebp
  100f26:	89 e5                	mov    %esp,%ebp
  100f28:	83 ec 48             	sub    $0x48,%esp
  100f2b:	66 c7 45 d2 fa 03    	movw   $0x3fa,-0x2e(%ebp)
  100f31:	c6 45 d1 00          	movb   $0x0,-0x2f(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100f35:	0f b6 45 d1          	movzbl -0x2f(%ebp),%eax
  100f39:	0f b7 55 d2          	movzwl -0x2e(%ebp),%edx
  100f3d:	ee                   	out    %al,(%dx)
}
  100f3e:	90                   	nop
  100f3f:	66 c7 45 d6 fb 03    	movw   $0x3fb,-0x2a(%ebp)
  100f45:	c6 45 d5 80          	movb   $0x80,-0x2b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100f49:	0f b6 45 d5          	movzbl -0x2b(%ebp),%eax
  100f4d:	0f b7 55 d6          	movzwl -0x2a(%ebp),%edx
  100f51:	ee                   	out    %al,(%dx)
}
  100f52:	90                   	nop
  100f53:	66 c7 45 da f8 03    	movw   $0x3f8,-0x26(%ebp)
  100f59:	c6 45 d9 0c          	movb   $0xc,-0x27(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100f5d:	0f b6 45 d9          	movzbl -0x27(%ebp),%eax
  100f61:	0f b7 55 da          	movzwl -0x26(%ebp),%edx
  100f65:	ee                   	out    %al,(%dx)
}
  100f66:	90                   	nop
  100f67:	66 c7 45 de f9 03    	movw   $0x3f9,-0x22(%ebp)
  100f6d:	c6 45 dd 00          	movb   $0x0,-0x23(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100f71:	0f b6 45 dd          	movzbl -0x23(%ebp),%eax
  100f75:	0f b7 55 de          	movzwl -0x22(%ebp),%edx
  100f79:	ee                   	out    %al,(%dx)
}
  100f7a:	90                   	nop
  100f7b:	66 c7 45 e2 fb 03    	movw   $0x3fb,-0x1e(%ebp)
  100f81:	c6 45 e1 03          	movb   $0x3,-0x1f(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100f85:	0f b6 45 e1          	movzbl -0x1f(%ebp),%eax
  100f89:	0f b7 55 e2          	movzwl -0x1e(%ebp),%edx
  100f8d:	ee                   	out    %al,(%dx)
}
  100f8e:	90                   	nop
  100f8f:	66 c7 45 e6 fc 03    	movw   $0x3fc,-0x1a(%ebp)
  100f95:	c6 45 e5 00          	movb   $0x0,-0x1b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100f99:	0f b6 45 e5          	movzbl -0x1b(%ebp),%eax
  100f9d:	0f b7 55 e6          	movzwl -0x1a(%ebp),%edx
  100fa1:	ee                   	out    %al,(%dx)
}
  100fa2:	90                   	nop
  100fa3:	66 c7 45 ea f9 03    	movw   $0x3f9,-0x16(%ebp)
  100fa9:	c6 45 e9 01          	movb   $0x1,-0x17(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  100fad:	0f b6 45 e9          	movzbl -0x17(%ebp),%eax
  100fb1:	0f b7 55 ea          	movzwl -0x16(%ebp),%edx
  100fb5:	ee                   	out    %al,(%dx)
}
  100fb6:	90                   	nop
  100fb7:	66 c7 45 ee fd 03    	movw   $0x3fd,-0x12(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  100fbd:	0f b7 45 ee          	movzwl -0x12(%ebp),%eax
  100fc1:	89 c2                	mov    %eax,%edx
  100fc3:	ec                   	in     (%dx),%al
  100fc4:	88 45 ed             	mov    %al,-0x13(%ebp)
    return data;
  100fc7:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
    // Enable rcv interrupts
    outb(COM1 + COM_IER, COM_IER_RDI);

    // Clear any preexisting overrun indications and interrupts
    // Serial port doesn't exist if COM_LSR returns 0xFF
    serial_exists = (inb(COM1 + COM_LSR) != 0xFF);
  100fcb:	3c ff                	cmp    $0xff,%al
  100fcd:	0f 95 c0             	setne  %al
  100fd0:	0f b6 c0             	movzbl %al,%eax
  100fd3:	a3 68 fe 10 00       	mov    %eax,0x10fe68
  100fd8:	66 c7 45 f2 fa 03    	movw   $0x3fa,-0xe(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  100fde:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
  100fe2:	89 c2                	mov    %eax,%edx
  100fe4:	ec                   	in     (%dx),%al
  100fe5:	88 45 f1             	mov    %al,-0xf(%ebp)
  100fe8:	66 c7 45 f6 f8 03    	movw   $0x3f8,-0xa(%ebp)
  100fee:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  100ff2:	89 c2                	mov    %eax,%edx
  100ff4:	ec                   	in     (%dx),%al
  100ff5:	88 45 f5             	mov    %al,-0xb(%ebp)
    (void) inb(COM1+COM_IIR);
    (void) inb(COM1+COM_RX);

    if (serial_exists) {
  100ff8:	a1 68 fe 10 00       	mov    0x10fe68,%eax
  100ffd:	85 c0                	test   %eax,%eax
  100fff:	74 0c                	je     10100d <serial_init+0xe8>
        pic_enable(IRQ_COM1);
  101001:	c7 04 24 04 00 00 00 	movl   $0x4,(%esp)
  101008:	e8 01 07 00 00       	call   10170e <pic_enable>
    }
}
  10100d:	90                   	nop
  10100e:	89 ec                	mov    %ebp,%esp
  101010:	5d                   	pop    %ebp
  101011:	c3                   	ret    

00101012 <lpt_putc_sub>:

static void
lpt_putc_sub(int c) {
  101012:	55                   	push   %ebp
  101013:	89 e5                	mov    %esp,%ebp
  101015:	83 ec 20             	sub    $0x20,%esp
    int i;
    for (i = 0; !(inb(LPTPORT + 1) & 0x80) && i < 12800; i ++) {
  101018:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
  10101f:	eb 08                	jmp    101029 <lpt_putc_sub+0x17>
        delay();
  101021:	e8 cc fd ff ff       	call   100df2 <delay>
    for (i = 0; !(inb(LPTPORT + 1) & 0x80) && i < 12800; i ++) {
  101026:	ff 45 fc             	incl   -0x4(%ebp)
  101029:	66 c7 45 fa 79 03    	movw   $0x379,-0x6(%ebp)
  10102f:	0f b7 45 fa          	movzwl -0x6(%ebp),%eax
  101033:	89 c2                	mov    %eax,%edx
  101035:	ec                   	in     (%dx),%al
  101036:	88 45 f9             	mov    %al,-0x7(%ebp)
    return data;
  101039:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
  10103d:	84 c0                	test   %al,%al
  10103f:	78 09                	js     10104a <lpt_putc_sub+0x38>
  101041:	81 7d fc ff 31 00 00 	cmpl   $0x31ff,-0x4(%ebp)
  101048:	7e d7                	jle    101021 <lpt_putc_sub+0xf>
    }
    outb(LPTPORT + 0, c);
  10104a:	8b 45 08             	mov    0x8(%ebp),%eax
  10104d:	0f b6 c0             	movzbl %al,%eax
  101050:	66 c7 45 ee 78 03    	movw   $0x378,-0x12(%ebp)
  101056:	88 45 ed             	mov    %al,-0x13(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101059:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  10105d:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  101061:	ee                   	out    %al,(%dx)
}
  101062:	90                   	nop
  101063:	66 c7 45 f2 7a 03    	movw   $0x37a,-0xe(%ebp)
  101069:	c6 45 f1 0d          	movb   $0xd,-0xf(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  10106d:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  101071:	0f b7 55 f2          	movzwl -0xe(%ebp),%edx
  101075:	ee                   	out    %al,(%dx)
}
  101076:	90                   	nop
  101077:	66 c7 45 f6 7a 03    	movw   $0x37a,-0xa(%ebp)
  10107d:	c6 45 f5 08          	movb   $0x8,-0xb(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101081:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
  101085:	0f b7 55 f6          	movzwl -0xa(%ebp),%edx
  101089:	ee                   	out    %al,(%dx)
}
  10108a:	90                   	nop
    outb(LPTPORT + 2, 0x08 | 0x04 | 0x01);
    outb(LPTPORT + 2, 0x08);
}
  10108b:	90                   	nop
  10108c:	89 ec                	mov    %ebp,%esp
  10108e:	5d                   	pop    %ebp
  10108f:	c3                   	ret    

00101090 <lpt_putc>:

/* lpt_putc - copy console output to parallel port */
static void
lpt_putc(int c) {
  101090:	55                   	push   %ebp
  101091:	89 e5                	mov    %esp,%ebp
  101093:	83 ec 04             	sub    $0x4,%esp
    if (c != '\b') {
  101096:	83 7d 08 08          	cmpl   $0x8,0x8(%ebp)
  10109a:	74 0d                	je     1010a9 <lpt_putc+0x19>
        lpt_putc_sub(c);
  10109c:	8b 45 08             	mov    0x8(%ebp),%eax
  10109f:	89 04 24             	mov    %eax,(%esp)
  1010a2:	e8 6b ff ff ff       	call   101012 <lpt_putc_sub>
    else {
        lpt_putc_sub('\b');
        lpt_putc_sub(' ');
        lpt_putc_sub('\b');
    }
}
  1010a7:	eb 24                	jmp    1010cd <lpt_putc+0x3d>
        lpt_putc_sub('\b');
  1010a9:	c7 04 24 08 00 00 00 	movl   $0x8,(%esp)
  1010b0:	e8 5d ff ff ff       	call   101012 <lpt_putc_sub>
        lpt_putc_sub(' ');
  1010b5:	c7 04 24 20 00 00 00 	movl   $0x20,(%esp)
  1010bc:	e8 51 ff ff ff       	call   101012 <lpt_putc_sub>
        lpt_putc_sub('\b');
  1010c1:	c7 04 24 08 00 00 00 	movl   $0x8,(%esp)
  1010c8:	e8 45 ff ff ff       	call   101012 <lpt_putc_sub>
}
  1010cd:	90                   	nop
  1010ce:	89 ec                	mov    %ebp,%esp
  1010d0:	5d                   	pop    %ebp
  1010d1:	c3                   	ret    

001010d2 <cga_putc>:

/* cga_putc - print character to console */
static void
cga_putc(int c) {
  1010d2:	55                   	push   %ebp
  1010d3:	89 e5                	mov    %esp,%ebp
  1010d5:	83 ec 38             	sub    $0x38,%esp
  1010d8:	89 5d fc             	mov    %ebx,-0x4(%ebp)
    // set black on white
    if (!(c & ~0xFF)) {
  1010db:	8b 45 08             	mov    0x8(%ebp),%eax
  1010de:	25 00 ff ff ff       	and    $0xffffff00,%eax
  1010e3:	85 c0                	test   %eax,%eax
  1010e5:	75 07                	jne    1010ee <cga_putc+0x1c>
        c |= 0x0700;
  1010e7:	81 4d 08 00 07 00 00 	orl    $0x700,0x8(%ebp)
    }

    switch (c & 0xff) {
  1010ee:	8b 45 08             	mov    0x8(%ebp),%eax
  1010f1:	0f b6 c0             	movzbl %al,%eax
  1010f4:	83 f8 0d             	cmp    $0xd,%eax
  1010f7:	74 72                	je     10116b <cga_putc+0x99>
  1010f9:	83 f8 0d             	cmp    $0xd,%eax
  1010fc:	0f 8f a3 00 00 00    	jg     1011a5 <cga_putc+0xd3>
  101102:	83 f8 08             	cmp    $0x8,%eax
  101105:	74 0a                	je     101111 <cga_putc+0x3f>
  101107:	83 f8 0a             	cmp    $0xa,%eax
  10110a:	74 4c                	je     101158 <cga_putc+0x86>
  10110c:	e9 94 00 00 00       	jmp    1011a5 <cga_putc+0xd3>
    case '\b':
        if (crt_pos > 0) {
  101111:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  101118:	85 c0                	test   %eax,%eax
  10111a:	0f 84 af 00 00 00    	je     1011cf <cga_putc+0xfd>
            crt_pos --;
  101120:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  101127:	48                   	dec    %eax
  101128:	0f b7 c0             	movzwl %ax,%eax
  10112b:	66 a3 64 fe 10 00    	mov    %ax,0x10fe64
            crt_buf[crt_pos] = (c & ~0xff) | ' ';
  101131:	8b 45 08             	mov    0x8(%ebp),%eax
  101134:	98                   	cwtl   
  101135:	25 00 ff ff ff       	and    $0xffffff00,%eax
  10113a:	98                   	cwtl   
  10113b:	83 c8 20             	or     $0x20,%eax
  10113e:	98                   	cwtl   
  10113f:	8b 0d 60 fe 10 00    	mov    0x10fe60,%ecx
  101145:	0f b7 15 64 fe 10 00 	movzwl 0x10fe64,%edx
  10114c:	01 d2                	add    %edx,%edx
  10114e:	01 ca                	add    %ecx,%edx
  101150:	0f b7 c0             	movzwl %ax,%eax
  101153:	66 89 02             	mov    %ax,(%edx)
        }
        break;
  101156:	eb 77                	jmp    1011cf <cga_putc+0xfd>
    case '\n':
        crt_pos += CRT_COLS;
  101158:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  10115f:	83 c0 50             	add    $0x50,%eax
  101162:	0f b7 c0             	movzwl %ax,%eax
  101165:	66 a3 64 fe 10 00    	mov    %ax,0x10fe64
    case '\r':
        crt_pos -= (crt_pos % CRT_COLS);
  10116b:	0f b7 1d 64 fe 10 00 	movzwl 0x10fe64,%ebx
  101172:	0f b7 0d 64 fe 10 00 	movzwl 0x10fe64,%ecx
  101179:	ba cd cc cc cc       	mov    $0xcccccccd,%edx
  10117e:	89 c8                	mov    %ecx,%eax
  101180:	f7 e2                	mul    %edx
  101182:	c1 ea 06             	shr    $0x6,%edx
  101185:	89 d0                	mov    %edx,%eax
  101187:	c1 e0 02             	shl    $0x2,%eax
  10118a:	01 d0                	add    %edx,%eax
  10118c:	c1 e0 04             	shl    $0x4,%eax
  10118f:	29 c1                	sub    %eax,%ecx
  101191:	89 ca                	mov    %ecx,%edx
  101193:	0f b7 d2             	movzwl %dx,%edx
  101196:	89 d8                	mov    %ebx,%eax
  101198:	29 d0                	sub    %edx,%eax
  10119a:	0f b7 c0             	movzwl %ax,%eax
  10119d:	66 a3 64 fe 10 00    	mov    %ax,0x10fe64
        break;
  1011a3:	eb 2b                	jmp    1011d0 <cga_putc+0xfe>
    default:
        crt_buf[crt_pos ++] = c;     // write the character
  1011a5:	8b 0d 60 fe 10 00    	mov    0x10fe60,%ecx
  1011ab:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  1011b2:	8d 50 01             	lea    0x1(%eax),%edx
  1011b5:	0f b7 d2             	movzwl %dx,%edx
  1011b8:	66 89 15 64 fe 10 00 	mov    %dx,0x10fe64
  1011bf:	01 c0                	add    %eax,%eax
  1011c1:	8d 14 01             	lea    (%ecx,%eax,1),%edx
  1011c4:	8b 45 08             	mov    0x8(%ebp),%eax
  1011c7:	0f b7 c0             	movzwl %ax,%eax
  1011ca:	66 89 02             	mov    %ax,(%edx)
        break;
  1011cd:	eb 01                	jmp    1011d0 <cga_putc+0xfe>
        break;
  1011cf:	90                   	nop
    }

    // What is the purpose of this?
    if (crt_pos >= CRT_SIZE) {
  1011d0:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  1011d7:	3d cf 07 00 00       	cmp    $0x7cf,%eax
  1011dc:	76 5e                	jbe    10123c <cga_putc+0x16a>
        int i;
        memmove(crt_buf, crt_buf + CRT_COLS, (CRT_SIZE - CRT_COLS) * sizeof(uint16_t));
  1011de:	a1 60 fe 10 00       	mov    0x10fe60,%eax
  1011e3:	8d 90 a0 00 00 00    	lea    0xa0(%eax),%edx
  1011e9:	a1 60 fe 10 00       	mov    0x10fe60,%eax
  1011ee:	c7 44 24 08 00 0f 00 	movl   $0xf00,0x8(%esp)
  1011f5:	00 
  1011f6:	89 54 24 04          	mov    %edx,0x4(%esp)
  1011fa:	89 04 24             	mov    %eax,(%esp)
  1011fd:	e8 74 23 00 00       	call   103576 <memmove>
        for (i = CRT_SIZE - CRT_COLS; i < CRT_SIZE; i ++) {
  101202:	c7 45 f4 80 07 00 00 	movl   $0x780,-0xc(%ebp)
  101209:	eb 15                	jmp    101220 <cga_putc+0x14e>
            crt_buf[i] = 0x0700 | ' ';
  10120b:	8b 15 60 fe 10 00    	mov    0x10fe60,%edx
  101211:	8b 45 f4             	mov    -0xc(%ebp),%eax
  101214:	01 c0                	add    %eax,%eax
  101216:	01 d0                	add    %edx,%eax
  101218:	66 c7 00 20 07       	movw   $0x720,(%eax)
        for (i = CRT_SIZE - CRT_COLS; i < CRT_SIZE; i ++) {
  10121d:	ff 45 f4             	incl   -0xc(%ebp)
  101220:	81 7d f4 cf 07 00 00 	cmpl   $0x7cf,-0xc(%ebp)
  101227:	7e e2                	jle    10120b <cga_putc+0x139>
        }
        crt_pos -= CRT_COLS;
  101229:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  101230:	83 e8 50             	sub    $0x50,%eax
  101233:	0f b7 c0             	movzwl %ax,%eax
  101236:	66 a3 64 fe 10 00    	mov    %ax,0x10fe64
    }

    // move that little blinky thing
    outb(addr_6845, 14);
  10123c:	0f b7 05 66 fe 10 00 	movzwl 0x10fe66,%eax
  101243:	66 89 45 e6          	mov    %ax,-0x1a(%ebp)
  101247:	c6 45 e5 0e          	movb   $0xe,-0x1b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  10124b:	0f b6 45 e5          	movzbl -0x1b(%ebp),%eax
  10124f:	0f b7 55 e6          	movzwl -0x1a(%ebp),%edx
  101253:	ee                   	out    %al,(%dx)
}
  101254:	90                   	nop
    outb(addr_6845 + 1, crt_pos >> 8);
  101255:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  10125c:	c1 e8 08             	shr    $0x8,%eax
  10125f:	0f b7 c0             	movzwl %ax,%eax
  101262:	0f b6 c0             	movzbl %al,%eax
  101265:	0f b7 15 66 fe 10 00 	movzwl 0x10fe66,%edx
  10126c:	42                   	inc    %edx
  10126d:	0f b7 d2             	movzwl %dx,%edx
  101270:	66 89 55 ea          	mov    %dx,-0x16(%ebp)
  101274:	88 45 e9             	mov    %al,-0x17(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101277:	0f b6 45 e9          	movzbl -0x17(%ebp),%eax
  10127b:	0f b7 55 ea          	movzwl -0x16(%ebp),%edx
  10127f:	ee                   	out    %al,(%dx)
}
  101280:	90                   	nop
    outb(addr_6845, 15);
  101281:	0f b7 05 66 fe 10 00 	movzwl 0x10fe66,%eax
  101288:	66 89 45 ee          	mov    %ax,-0x12(%ebp)
  10128c:	c6 45 ed 0f          	movb   $0xf,-0x13(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101290:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  101294:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  101298:	ee                   	out    %al,(%dx)
}
  101299:	90                   	nop
    outb(addr_6845 + 1, crt_pos);
  10129a:	0f b7 05 64 fe 10 00 	movzwl 0x10fe64,%eax
  1012a1:	0f b6 c0             	movzbl %al,%eax
  1012a4:	0f b7 15 66 fe 10 00 	movzwl 0x10fe66,%edx
  1012ab:	42                   	inc    %edx
  1012ac:	0f b7 d2             	movzwl %dx,%edx
  1012af:	66 89 55 f2          	mov    %dx,-0xe(%ebp)
  1012b3:	88 45 f1             	mov    %al,-0xf(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1012b6:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  1012ba:	0f b7 55 f2          	movzwl -0xe(%ebp),%edx
  1012be:	ee                   	out    %al,(%dx)
}
  1012bf:	90                   	nop
}
  1012c0:	90                   	nop
  1012c1:	8b 5d fc             	mov    -0x4(%ebp),%ebx
  1012c4:	89 ec                	mov    %ebp,%esp
  1012c6:	5d                   	pop    %ebp
  1012c7:	c3                   	ret    

001012c8 <serial_putc_sub>:

static void
serial_putc_sub(int c) {
  1012c8:	55                   	push   %ebp
  1012c9:	89 e5                	mov    %esp,%ebp
  1012cb:	83 ec 10             	sub    $0x10,%esp
    int i;
    for (i = 0; !(inb(COM1 + COM_LSR) & COM_LSR_TXRDY) && i < 12800; i ++) {
  1012ce:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
  1012d5:	eb 08                	jmp    1012df <serial_putc_sub+0x17>
        delay();
  1012d7:	e8 16 fb ff ff       	call   100df2 <delay>
    for (i = 0; !(inb(COM1 + COM_LSR) & COM_LSR_TXRDY) && i < 12800; i ++) {
  1012dc:	ff 45 fc             	incl   -0x4(%ebp)
  1012df:	66 c7 45 fa fd 03    	movw   $0x3fd,-0x6(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  1012e5:	0f b7 45 fa          	movzwl -0x6(%ebp),%eax
  1012e9:	89 c2                	mov    %eax,%edx
  1012eb:	ec                   	in     (%dx),%al
  1012ec:	88 45 f9             	mov    %al,-0x7(%ebp)
    return data;
  1012ef:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
  1012f3:	0f b6 c0             	movzbl %al,%eax
  1012f6:	83 e0 20             	and    $0x20,%eax
  1012f9:	85 c0                	test   %eax,%eax
  1012fb:	75 09                	jne    101306 <serial_putc_sub+0x3e>
  1012fd:	81 7d fc ff 31 00 00 	cmpl   $0x31ff,-0x4(%ebp)
  101304:	7e d1                	jle    1012d7 <serial_putc_sub+0xf>
    }
    outb(COM1 + COM_TX, c);
  101306:	8b 45 08             	mov    0x8(%ebp),%eax
  101309:	0f b6 c0             	movzbl %al,%eax
  10130c:	66 c7 45 f6 f8 03    	movw   $0x3f8,-0xa(%ebp)
  101312:	88 45 f5             	mov    %al,-0xb(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101315:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
  101319:	0f b7 55 f6          	movzwl -0xa(%ebp),%edx
  10131d:	ee                   	out    %al,(%dx)
}
  10131e:	90                   	nop
}
  10131f:	90                   	nop
  101320:	89 ec                	mov    %ebp,%esp
  101322:	5d                   	pop    %ebp
  101323:	c3                   	ret    

00101324 <serial_putc>:

/* serial_putc - print character to serial port */
static void
serial_putc(int c) {
  101324:	55                   	push   %ebp
  101325:	89 e5                	mov    %esp,%ebp
  101327:	83 ec 04             	sub    $0x4,%esp
    if (c != '\b') {
  10132a:	83 7d 08 08          	cmpl   $0x8,0x8(%ebp)
  10132e:	74 0d                	je     10133d <serial_putc+0x19>
        serial_putc_sub(c);
  101330:	8b 45 08             	mov    0x8(%ebp),%eax
  101333:	89 04 24             	mov    %eax,(%esp)
  101336:	e8 8d ff ff ff       	call   1012c8 <serial_putc_sub>
    else {
        serial_putc_sub('\b');
        serial_putc_sub(' ');
        serial_putc_sub('\b');
    }
}
  10133b:	eb 24                	jmp    101361 <serial_putc+0x3d>
        serial_putc_sub('\b');
  10133d:	c7 04 24 08 00 00 00 	movl   $0x8,(%esp)
  101344:	e8 7f ff ff ff       	call   1012c8 <serial_putc_sub>
        serial_putc_sub(' ');
  101349:	c7 04 24 20 00 00 00 	movl   $0x20,(%esp)
  101350:	e8 73 ff ff ff       	call   1012c8 <serial_putc_sub>
        serial_putc_sub('\b');
  101355:	c7 04 24 08 00 00 00 	movl   $0x8,(%esp)
  10135c:	e8 67 ff ff ff       	call   1012c8 <serial_putc_sub>
}
  101361:	90                   	nop
  101362:	89 ec                	mov    %ebp,%esp
  101364:	5d                   	pop    %ebp
  101365:	c3                   	ret    

00101366 <cons_intr>:
/* *
 * cons_intr - called by device interrupt routines to feed input
 * characters into the circular console input buffer.
 * */
static void
cons_intr(int (*proc)(void)) {
  101366:	55                   	push   %ebp
  101367:	89 e5                	mov    %esp,%ebp
  101369:	83 ec 18             	sub    $0x18,%esp
    int c;
    while ((c = (*proc)()) != -1) {
  10136c:	eb 33                	jmp    1013a1 <cons_intr+0x3b>
        if (c != 0) {
  10136e:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  101372:	74 2d                	je     1013a1 <cons_intr+0x3b>
            cons.buf[cons.wpos ++] = c;
  101374:	a1 84 00 11 00       	mov    0x110084,%eax
  101379:	8d 50 01             	lea    0x1(%eax),%edx
  10137c:	89 15 84 00 11 00    	mov    %edx,0x110084
  101382:	8b 55 f4             	mov    -0xc(%ebp),%edx
  101385:	88 90 80 fe 10 00    	mov    %dl,0x10fe80(%eax)
            if (cons.wpos == CONSBUFSIZE) {
  10138b:	a1 84 00 11 00       	mov    0x110084,%eax
  101390:	3d 00 02 00 00       	cmp    $0x200,%eax
  101395:	75 0a                	jne    1013a1 <cons_intr+0x3b>
                cons.wpos = 0;
  101397:	c7 05 84 00 11 00 00 	movl   $0x0,0x110084
  10139e:	00 00 00 
    while ((c = (*proc)()) != -1) {
  1013a1:	8b 45 08             	mov    0x8(%ebp),%eax
  1013a4:	ff d0                	call   *%eax
  1013a6:	89 45 f4             	mov    %eax,-0xc(%ebp)
  1013a9:	83 7d f4 ff          	cmpl   $0xffffffff,-0xc(%ebp)
  1013ad:	75 bf                	jne    10136e <cons_intr+0x8>
            }
        }
    }
}
  1013af:	90                   	nop
  1013b0:	90                   	nop
  1013b1:	89 ec                	mov    %ebp,%esp
  1013b3:	5d                   	pop    %ebp
  1013b4:	c3                   	ret    

001013b5 <serial_proc_data>:

/* serial_proc_data - get data from serial port */
static int
serial_proc_data(void) {
  1013b5:	55                   	push   %ebp
  1013b6:	89 e5                	mov    %esp,%ebp
  1013b8:	83 ec 10             	sub    $0x10,%esp
  1013bb:	66 c7 45 fa fd 03    	movw   $0x3fd,-0x6(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  1013c1:	0f b7 45 fa          	movzwl -0x6(%ebp),%eax
  1013c5:	89 c2                	mov    %eax,%edx
  1013c7:	ec                   	in     (%dx),%al
  1013c8:	88 45 f9             	mov    %al,-0x7(%ebp)
    return data;
  1013cb:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
    if (!(inb(COM1 + COM_LSR) & COM_LSR_DATA)) {
  1013cf:	0f b6 c0             	movzbl %al,%eax
  1013d2:	83 e0 01             	and    $0x1,%eax
  1013d5:	85 c0                	test   %eax,%eax
  1013d7:	75 07                	jne    1013e0 <serial_proc_data+0x2b>
        return -1;
  1013d9:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  1013de:	eb 2a                	jmp    10140a <serial_proc_data+0x55>
  1013e0:	66 c7 45 f6 f8 03    	movw   $0x3f8,-0xa(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  1013e6:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  1013ea:	89 c2                	mov    %eax,%edx
  1013ec:	ec                   	in     (%dx),%al
  1013ed:	88 45 f5             	mov    %al,-0xb(%ebp)
    return data;
  1013f0:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
    }
    int c = inb(COM1 + COM_RX);
  1013f4:	0f b6 c0             	movzbl %al,%eax
  1013f7:	89 45 fc             	mov    %eax,-0x4(%ebp)
    if (c == 127) {
  1013fa:	83 7d fc 7f          	cmpl   $0x7f,-0x4(%ebp)
  1013fe:	75 07                	jne    101407 <serial_proc_data+0x52>
        c = '\b';
  101400:	c7 45 fc 08 00 00 00 	movl   $0x8,-0x4(%ebp)
    }
    return c;
  101407:	8b 45 fc             	mov    -0x4(%ebp),%eax
}
  10140a:	89 ec                	mov    %ebp,%esp
  10140c:	5d                   	pop    %ebp
  10140d:	c3                   	ret    

0010140e <serial_intr>:

/* serial_intr - try to feed input characters from serial port */
void
serial_intr(void) {
  10140e:	55                   	push   %ebp
  10140f:	89 e5                	mov    %esp,%ebp
  101411:	83 ec 18             	sub    $0x18,%esp
    if (serial_exists) {
  101414:	a1 68 fe 10 00       	mov    0x10fe68,%eax
  101419:	85 c0                	test   %eax,%eax
  10141b:	74 0c                	je     101429 <serial_intr+0x1b>
        cons_intr(serial_proc_data);
  10141d:	c7 04 24 b5 13 10 00 	movl   $0x1013b5,(%esp)
  101424:	e8 3d ff ff ff       	call   101366 <cons_intr>
    }
}
  101429:	90                   	nop
  10142a:	89 ec                	mov    %ebp,%esp
  10142c:	5d                   	pop    %ebp
  10142d:	c3                   	ret    

0010142e <kbd_proc_data>:
 *
 * The kbd_proc_data() function gets data from the keyboard.
 * If we finish a character, return it, else 0. And return -1 if no data.
 * */
static int
kbd_proc_data(void) {
  10142e:	55                   	push   %ebp
  10142f:	89 e5                	mov    %esp,%ebp
  101431:	83 ec 38             	sub    $0x38,%esp
  101434:	66 c7 45 f0 64 00    	movw   $0x64,-0x10(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  10143a:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10143d:	89 c2                	mov    %eax,%edx
  10143f:	ec                   	in     (%dx),%al
  101440:	88 45 ef             	mov    %al,-0x11(%ebp)
    return data;
  101443:	0f b6 45 ef          	movzbl -0x11(%ebp),%eax
    int c;
    uint8_t data;
    static uint32_t shift;

    if ((inb(KBSTATP) & KBS_DIB) == 0) {
  101447:	0f b6 c0             	movzbl %al,%eax
  10144a:	83 e0 01             	and    $0x1,%eax
  10144d:	85 c0                	test   %eax,%eax
  10144f:	75 0a                	jne    10145b <kbd_proc_data+0x2d>
        return -1;
  101451:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  101456:	e9 56 01 00 00       	jmp    1015b1 <kbd_proc_data+0x183>
  10145b:	66 c7 45 ec 60 00    	movw   $0x60,-0x14(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port));
  101461:	8b 45 ec             	mov    -0x14(%ebp),%eax
  101464:	89 c2                	mov    %eax,%edx
  101466:	ec                   	in     (%dx),%al
  101467:	88 45 eb             	mov    %al,-0x15(%ebp)
    return data;
  10146a:	0f b6 45 eb          	movzbl -0x15(%ebp),%eax
    }

    data = inb(KBDATAP);
  10146e:	88 45 f3             	mov    %al,-0xd(%ebp)

    if (data == 0xE0) {
  101471:	80 7d f3 e0          	cmpb   $0xe0,-0xd(%ebp)
  101475:	75 17                	jne    10148e <kbd_proc_data+0x60>
        // E0 escape character
        shift |= E0ESC;
  101477:	a1 88 00 11 00       	mov    0x110088,%eax
  10147c:	83 c8 40             	or     $0x40,%eax
  10147f:	a3 88 00 11 00       	mov    %eax,0x110088
        return 0;
  101484:	b8 00 00 00 00       	mov    $0x0,%eax
  101489:	e9 23 01 00 00       	jmp    1015b1 <kbd_proc_data+0x183>
    } else if (data & 0x80) {
  10148e:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  101492:	84 c0                	test   %al,%al
  101494:	79 45                	jns    1014db <kbd_proc_data+0xad>
        // Key released
        data = (shift & E0ESC ? data : data & 0x7F);
  101496:	a1 88 00 11 00       	mov    0x110088,%eax
  10149b:	83 e0 40             	and    $0x40,%eax
  10149e:	85 c0                	test   %eax,%eax
  1014a0:	75 08                	jne    1014aa <kbd_proc_data+0x7c>
  1014a2:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  1014a6:	24 7f                	and    $0x7f,%al
  1014a8:	eb 04                	jmp    1014ae <kbd_proc_data+0x80>
  1014aa:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  1014ae:	88 45 f3             	mov    %al,-0xd(%ebp)
        shift &= ~(shiftcode[data] | E0ESC);
  1014b1:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  1014b5:	0f b6 80 40 f0 10 00 	movzbl 0x10f040(%eax),%eax
  1014bc:	0c 40                	or     $0x40,%al
  1014be:	0f b6 c0             	movzbl %al,%eax
  1014c1:	f7 d0                	not    %eax
  1014c3:	89 c2                	mov    %eax,%edx
  1014c5:	a1 88 00 11 00       	mov    0x110088,%eax
  1014ca:	21 d0                	and    %edx,%eax
  1014cc:	a3 88 00 11 00       	mov    %eax,0x110088
        return 0;
  1014d1:	b8 00 00 00 00       	mov    $0x0,%eax
  1014d6:	e9 d6 00 00 00       	jmp    1015b1 <kbd_proc_data+0x183>
    } else if (shift & E0ESC) {
  1014db:	a1 88 00 11 00       	mov    0x110088,%eax
  1014e0:	83 e0 40             	and    $0x40,%eax
  1014e3:	85 c0                	test   %eax,%eax
  1014e5:	74 11                	je     1014f8 <kbd_proc_data+0xca>
        // Last character was an E0 escape; or with 0x80
        data |= 0x80;
  1014e7:	80 4d f3 80          	orb    $0x80,-0xd(%ebp)
        shift &= ~E0ESC;
  1014eb:	a1 88 00 11 00       	mov    0x110088,%eax
  1014f0:	83 e0 bf             	and    $0xffffffbf,%eax
  1014f3:	a3 88 00 11 00       	mov    %eax,0x110088
    }

    shift |= shiftcode[data];
  1014f8:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  1014fc:	0f b6 80 40 f0 10 00 	movzbl 0x10f040(%eax),%eax
  101503:	0f b6 d0             	movzbl %al,%edx
  101506:	a1 88 00 11 00       	mov    0x110088,%eax
  10150b:	09 d0                	or     %edx,%eax
  10150d:	a3 88 00 11 00       	mov    %eax,0x110088
    shift ^= togglecode[data];
  101512:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  101516:	0f b6 80 40 f1 10 00 	movzbl 0x10f140(%eax),%eax
  10151d:	0f b6 d0             	movzbl %al,%edx
  101520:	a1 88 00 11 00       	mov    0x110088,%eax
  101525:	31 d0                	xor    %edx,%eax
  101527:	a3 88 00 11 00       	mov    %eax,0x110088

    c = charcode[shift & (CTL | SHIFT)][data];
  10152c:	a1 88 00 11 00       	mov    0x110088,%eax
  101531:	83 e0 03             	and    $0x3,%eax
  101534:	8b 14 85 40 f5 10 00 	mov    0x10f540(,%eax,4),%edx
  10153b:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  10153f:	01 d0                	add    %edx,%eax
  101541:	0f b6 00             	movzbl (%eax),%eax
  101544:	0f b6 c0             	movzbl %al,%eax
  101547:	89 45 f4             	mov    %eax,-0xc(%ebp)
    if (shift & CAPSLOCK) {
  10154a:	a1 88 00 11 00       	mov    0x110088,%eax
  10154f:	83 e0 08             	and    $0x8,%eax
  101552:	85 c0                	test   %eax,%eax
  101554:	74 22                	je     101578 <kbd_proc_data+0x14a>
        if ('a' <= c && c <= 'z')
  101556:	83 7d f4 60          	cmpl   $0x60,-0xc(%ebp)
  10155a:	7e 0c                	jle    101568 <kbd_proc_data+0x13a>
  10155c:	83 7d f4 7a          	cmpl   $0x7a,-0xc(%ebp)
  101560:	7f 06                	jg     101568 <kbd_proc_data+0x13a>
            c += 'A' - 'a';
  101562:	83 6d f4 20          	subl   $0x20,-0xc(%ebp)
  101566:	eb 10                	jmp    101578 <kbd_proc_data+0x14a>
        else if ('A' <= c && c <= 'Z')
  101568:	83 7d f4 40          	cmpl   $0x40,-0xc(%ebp)
  10156c:	7e 0a                	jle    101578 <kbd_proc_data+0x14a>
  10156e:	83 7d f4 5a          	cmpl   $0x5a,-0xc(%ebp)
  101572:	7f 04                	jg     101578 <kbd_proc_data+0x14a>
            c += 'a' - 'A';
  101574:	83 45 f4 20          	addl   $0x20,-0xc(%ebp)
    }

    // Process special keys
    // Ctrl-Alt-Del: reboot
    if (!(~shift & (CTL | ALT)) && c == KEY_DEL) {
  101578:	a1 88 00 11 00       	mov    0x110088,%eax
  10157d:	f7 d0                	not    %eax
  10157f:	83 e0 06             	and    $0x6,%eax
  101582:	85 c0                	test   %eax,%eax
  101584:	75 28                	jne    1015ae <kbd_proc_data+0x180>
  101586:	81 7d f4 e9 00 00 00 	cmpl   $0xe9,-0xc(%ebp)
  10158d:	75 1f                	jne    1015ae <kbd_proc_data+0x180>
        cprintf("Rebooting!\n");
  10158f:	c7 04 24 ef 39 10 00 	movl   $0x1039ef,(%esp)
  101596:	e8 95 ed ff ff       	call   100330 <cprintf>
  10159b:	66 c7 45 e8 92 00    	movw   $0x92,-0x18(%ebp)
  1015a1:	c6 45 e7 03          	movb   $0x3,-0x19(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1015a5:	0f b6 45 e7          	movzbl -0x19(%ebp),%eax
  1015a9:	8b 55 e8             	mov    -0x18(%ebp),%edx
  1015ac:	ee                   	out    %al,(%dx)
}
  1015ad:	90                   	nop
        outb(0x92, 0x3); // courtesy of Chris Frost
    }
    return c;
  1015ae:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  1015b1:	89 ec                	mov    %ebp,%esp
  1015b3:	5d                   	pop    %ebp
  1015b4:	c3                   	ret    

001015b5 <kbd_intr>:

/* kbd_intr - try to feed input characters from keyboard */
static void
kbd_intr(void) {
  1015b5:	55                   	push   %ebp
  1015b6:	89 e5                	mov    %esp,%ebp
  1015b8:	83 ec 18             	sub    $0x18,%esp
    cons_intr(kbd_proc_data);
  1015bb:	c7 04 24 2e 14 10 00 	movl   $0x10142e,(%esp)
  1015c2:	e8 9f fd ff ff       	call   101366 <cons_intr>
}
  1015c7:	90                   	nop
  1015c8:	89 ec                	mov    %ebp,%esp
  1015ca:	5d                   	pop    %ebp
  1015cb:	c3                   	ret    

001015cc <kbd_init>:

static void
kbd_init(void) {
  1015cc:	55                   	push   %ebp
  1015cd:	89 e5                	mov    %esp,%ebp
  1015cf:	83 ec 18             	sub    $0x18,%esp
    // drain the kbd buffer
    kbd_intr();
  1015d2:	e8 de ff ff ff       	call   1015b5 <kbd_intr>
    pic_enable(IRQ_KBD);
  1015d7:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  1015de:	e8 2b 01 00 00       	call   10170e <pic_enable>
}
  1015e3:	90                   	nop
  1015e4:	89 ec                	mov    %ebp,%esp
  1015e6:	5d                   	pop    %ebp
  1015e7:	c3                   	ret    

001015e8 <cons_init>:

/* cons_init - initializes the console devices */
void
cons_init(void) {
  1015e8:	55                   	push   %ebp
  1015e9:	89 e5                	mov    %esp,%ebp
  1015eb:	83 ec 18             	sub    $0x18,%esp
    cga_init();
  1015ee:	e8 4a f8 ff ff       	call   100e3d <cga_init>
    serial_init();
  1015f3:	e8 2d f9 ff ff       	call   100f25 <serial_init>
    kbd_init();
  1015f8:	e8 cf ff ff ff       	call   1015cc <kbd_init>
    if (!serial_exists) {
  1015fd:	a1 68 fe 10 00       	mov    0x10fe68,%eax
  101602:	85 c0                	test   %eax,%eax
  101604:	75 0c                	jne    101612 <cons_init+0x2a>
        cprintf("serial port does not exist!!\n");
  101606:	c7 04 24 fb 39 10 00 	movl   $0x1039fb,(%esp)
  10160d:	e8 1e ed ff ff       	call   100330 <cprintf>
    }
}
  101612:	90                   	nop
  101613:	89 ec                	mov    %ebp,%esp
  101615:	5d                   	pop    %ebp
  101616:	c3                   	ret    

00101617 <cons_putc>:

/* cons_putc - print a single character @c to console devices */
void
cons_putc(int c) {
  101617:	55                   	push   %ebp
  101618:	89 e5                	mov    %esp,%ebp
  10161a:	83 ec 18             	sub    $0x18,%esp
    lpt_putc(c);
  10161d:	8b 45 08             	mov    0x8(%ebp),%eax
  101620:	89 04 24             	mov    %eax,(%esp)
  101623:	e8 68 fa ff ff       	call   101090 <lpt_putc>
    cga_putc(c);
  101628:	8b 45 08             	mov    0x8(%ebp),%eax
  10162b:	89 04 24             	mov    %eax,(%esp)
  10162e:	e8 9f fa ff ff       	call   1010d2 <cga_putc>
    serial_putc(c);
  101633:	8b 45 08             	mov    0x8(%ebp),%eax
  101636:	89 04 24             	mov    %eax,(%esp)
  101639:	e8 e6 fc ff ff       	call   101324 <serial_putc>
}
  10163e:	90                   	nop
  10163f:	89 ec                	mov    %ebp,%esp
  101641:	5d                   	pop    %ebp
  101642:	c3                   	ret    

00101643 <cons_getc>:
/* *
 * cons_getc - return the next input character from console,
 * or 0 if none waiting.
 * */
int
cons_getc(void) {
  101643:	55                   	push   %ebp
  101644:	89 e5                	mov    %esp,%ebp
  101646:	83 ec 18             	sub    $0x18,%esp
    int c;

    // poll for any pending input characters,
    // so that this function works even when interrupts are disabled
    // (e.g., when called from the kernel monitor).
    serial_intr();
  101649:	e8 c0 fd ff ff       	call   10140e <serial_intr>
    kbd_intr();
  10164e:	e8 62 ff ff ff       	call   1015b5 <kbd_intr>

    // grab the next character from the input buffer.
    if (cons.rpos != cons.wpos) {
  101653:	8b 15 80 00 11 00    	mov    0x110080,%edx
  101659:	a1 84 00 11 00       	mov    0x110084,%eax
  10165e:	39 c2                	cmp    %eax,%edx
  101660:	74 36                	je     101698 <cons_getc+0x55>
        c = cons.buf[cons.rpos ++];
  101662:	a1 80 00 11 00       	mov    0x110080,%eax
  101667:	8d 50 01             	lea    0x1(%eax),%edx
  10166a:	89 15 80 00 11 00    	mov    %edx,0x110080
  101670:	0f b6 80 80 fe 10 00 	movzbl 0x10fe80(%eax),%eax
  101677:	0f b6 c0             	movzbl %al,%eax
  10167a:	89 45 f4             	mov    %eax,-0xc(%ebp)
        if (cons.rpos == CONSBUFSIZE) {
  10167d:	a1 80 00 11 00       	mov    0x110080,%eax
  101682:	3d 00 02 00 00       	cmp    $0x200,%eax
  101687:	75 0a                	jne    101693 <cons_getc+0x50>
            cons.rpos = 0;
  101689:	c7 05 80 00 11 00 00 	movl   $0x0,0x110080
  101690:	00 00 00 
        }
        return c;
  101693:	8b 45 f4             	mov    -0xc(%ebp),%eax
  101696:	eb 05                	jmp    10169d <cons_getc+0x5a>
    }
    return 0;
  101698:	b8 00 00 00 00       	mov    $0x0,%eax
}
  10169d:	89 ec                	mov    %ebp,%esp
  10169f:	5d                   	pop    %ebp
  1016a0:	c3                   	ret    

001016a1 <intr_enable>:
#include <x86.h>
#include <intr.h>

/* intr_enable - enable irq interrupt */
void
intr_enable(void) {
  1016a1:	55                   	push   %ebp
  1016a2:	89 e5                	mov    %esp,%ebp
    asm volatile ("lidt (%0)" :: "r" (pd));
}

static inline void
sti(void) {
    asm volatile ("sti");
  1016a4:	fb                   	sti    
}
  1016a5:	90                   	nop
    sti();
}
  1016a6:	90                   	nop
  1016a7:	5d                   	pop    %ebp
  1016a8:	c3                   	ret    

001016a9 <intr_disable>:

/* intr_disable - disable irq interrupt */
void
intr_disable(void) {
  1016a9:	55                   	push   %ebp
  1016aa:	89 e5                	mov    %esp,%ebp

static inline void
cli(void) {
    asm volatile ("cli");
  1016ac:	fa                   	cli    
}
  1016ad:	90                   	nop
    cli();
}
  1016ae:	90                   	nop
  1016af:	5d                   	pop    %ebp
  1016b0:	c3                   	ret    

001016b1 <pic_setmask>:
// Initial IRQ mask has interrupt 2 enabled (for slave 8259A).
static uint16_t irq_mask = 0xFFFF & ~(1 << IRQ_SLAVE);
static bool did_init = 0;

static void
pic_setmask(uint16_t mask) {
  1016b1:	55                   	push   %ebp
  1016b2:	89 e5                	mov    %esp,%ebp
  1016b4:	83 ec 14             	sub    $0x14,%esp
  1016b7:	8b 45 08             	mov    0x8(%ebp),%eax
  1016ba:	66 89 45 ec          	mov    %ax,-0x14(%ebp)
    irq_mask = mask;
  1016be:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1016c1:	66 a3 50 f5 10 00    	mov    %ax,0x10f550
    if (did_init) {
  1016c7:	a1 8c 00 11 00       	mov    0x11008c,%eax
  1016cc:	85 c0                	test   %eax,%eax
  1016ce:	74 39                	je     101709 <pic_setmask+0x58>
        outb(IO_PIC1 + 1, mask);
  1016d0:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1016d3:	0f b6 c0             	movzbl %al,%eax
  1016d6:	66 c7 45 fa 21 00    	movw   $0x21,-0x6(%ebp)
  1016dc:	88 45 f9             	mov    %al,-0x7(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1016df:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
  1016e3:	0f b7 55 fa          	movzwl -0x6(%ebp),%edx
  1016e7:	ee                   	out    %al,(%dx)
}
  1016e8:	90                   	nop
        outb(IO_PIC2 + 1, mask >> 8);
  1016e9:	0f b7 45 ec          	movzwl -0x14(%ebp),%eax
  1016ed:	c1 e8 08             	shr    $0x8,%eax
  1016f0:	0f b7 c0             	movzwl %ax,%eax
  1016f3:	0f b6 c0             	movzbl %al,%eax
  1016f6:	66 c7 45 fe a1 00    	movw   $0xa1,-0x2(%ebp)
  1016fc:	88 45 fd             	mov    %al,-0x3(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1016ff:	0f b6 45 fd          	movzbl -0x3(%ebp),%eax
  101703:	0f b7 55 fe          	movzwl -0x2(%ebp),%edx
  101707:	ee                   	out    %al,(%dx)
}
  101708:	90                   	nop
    }
}
  101709:	90                   	nop
  10170a:	89 ec                	mov    %ebp,%esp
  10170c:	5d                   	pop    %ebp
  10170d:	c3                   	ret    

0010170e <pic_enable>:

void
pic_enable(unsigned int irq) {
  10170e:	55                   	push   %ebp
  10170f:	89 e5                	mov    %esp,%ebp
  101711:	83 ec 04             	sub    $0x4,%esp
    pic_setmask(irq_mask & ~(1 << irq));
  101714:	8b 45 08             	mov    0x8(%ebp),%eax
  101717:	ba 01 00 00 00       	mov    $0x1,%edx
  10171c:	88 c1                	mov    %al,%cl
  10171e:	d3 e2                	shl    %cl,%edx
  101720:	89 d0                	mov    %edx,%eax
  101722:	98                   	cwtl   
  101723:	f7 d0                	not    %eax
  101725:	0f bf d0             	movswl %ax,%edx
  101728:	0f b7 05 50 f5 10 00 	movzwl 0x10f550,%eax
  10172f:	98                   	cwtl   
  101730:	21 d0                	and    %edx,%eax
  101732:	98                   	cwtl   
  101733:	0f b7 c0             	movzwl %ax,%eax
  101736:	89 04 24             	mov    %eax,(%esp)
  101739:	e8 73 ff ff ff       	call   1016b1 <pic_setmask>
}
  10173e:	90                   	nop
  10173f:	89 ec                	mov    %ebp,%esp
  101741:	5d                   	pop    %ebp
  101742:	c3                   	ret    

00101743 <pic_init>:

/* pic_init - initialize the 8259A interrupt controllers */
void
pic_init(void) {
  101743:	55                   	push   %ebp
  101744:	89 e5                	mov    %esp,%ebp
  101746:	83 ec 44             	sub    $0x44,%esp
    did_init = 1;
  101749:	c7 05 8c 00 11 00 01 	movl   $0x1,0x11008c
  101750:	00 00 00 
  101753:	66 c7 45 ca 21 00    	movw   $0x21,-0x36(%ebp)
  101759:	c6 45 c9 ff          	movb   $0xff,-0x37(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  10175d:	0f b6 45 c9          	movzbl -0x37(%ebp),%eax
  101761:	0f b7 55 ca          	movzwl -0x36(%ebp),%edx
  101765:	ee                   	out    %al,(%dx)
}
  101766:	90                   	nop
  101767:	66 c7 45 ce a1 00    	movw   $0xa1,-0x32(%ebp)
  10176d:	c6 45 cd ff          	movb   $0xff,-0x33(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101771:	0f b6 45 cd          	movzbl -0x33(%ebp),%eax
  101775:	0f b7 55 ce          	movzwl -0x32(%ebp),%edx
  101779:	ee                   	out    %al,(%dx)
}
  10177a:	90                   	nop
  10177b:	66 c7 45 d2 20 00    	movw   $0x20,-0x2e(%ebp)
  101781:	c6 45 d1 11          	movb   $0x11,-0x2f(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101785:	0f b6 45 d1          	movzbl -0x2f(%ebp),%eax
  101789:	0f b7 55 d2          	movzwl -0x2e(%ebp),%edx
  10178d:	ee                   	out    %al,(%dx)
}
  10178e:	90                   	nop
  10178f:	66 c7 45 d6 21 00    	movw   $0x21,-0x2a(%ebp)
  101795:	c6 45 d5 20          	movb   $0x20,-0x2b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101799:	0f b6 45 d5          	movzbl -0x2b(%ebp),%eax
  10179d:	0f b7 55 d6          	movzwl -0x2a(%ebp),%edx
  1017a1:	ee                   	out    %al,(%dx)
}
  1017a2:	90                   	nop
  1017a3:	66 c7 45 da 21 00    	movw   $0x21,-0x26(%ebp)
  1017a9:	c6 45 d9 04          	movb   $0x4,-0x27(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1017ad:	0f b6 45 d9          	movzbl -0x27(%ebp),%eax
  1017b1:	0f b7 55 da          	movzwl -0x26(%ebp),%edx
  1017b5:	ee                   	out    %al,(%dx)
}
  1017b6:	90                   	nop
  1017b7:	66 c7 45 de 21 00    	movw   $0x21,-0x22(%ebp)
  1017bd:	c6 45 dd 03          	movb   $0x3,-0x23(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1017c1:	0f b6 45 dd          	movzbl -0x23(%ebp),%eax
  1017c5:	0f b7 55 de          	movzwl -0x22(%ebp),%edx
  1017c9:	ee                   	out    %al,(%dx)
}
  1017ca:	90                   	nop
  1017cb:	66 c7 45 e2 a0 00    	movw   $0xa0,-0x1e(%ebp)
  1017d1:	c6 45 e1 11          	movb   $0x11,-0x1f(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1017d5:	0f b6 45 e1          	movzbl -0x1f(%ebp),%eax
  1017d9:	0f b7 55 e2          	movzwl -0x1e(%ebp),%edx
  1017dd:	ee                   	out    %al,(%dx)
}
  1017de:	90                   	nop
  1017df:	66 c7 45 e6 a1 00    	movw   $0xa1,-0x1a(%ebp)
  1017e5:	c6 45 e5 28          	movb   $0x28,-0x1b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1017e9:	0f b6 45 e5          	movzbl -0x1b(%ebp),%eax
  1017ed:	0f b7 55 e6          	movzwl -0x1a(%ebp),%edx
  1017f1:	ee                   	out    %al,(%dx)
}
  1017f2:	90                   	nop
  1017f3:	66 c7 45 ea a1 00    	movw   $0xa1,-0x16(%ebp)
  1017f9:	c6 45 e9 02          	movb   $0x2,-0x17(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  1017fd:	0f b6 45 e9          	movzbl -0x17(%ebp),%eax
  101801:	0f b7 55 ea          	movzwl -0x16(%ebp),%edx
  101805:	ee                   	out    %al,(%dx)
}
  101806:	90                   	nop
  101807:	66 c7 45 ee a1 00    	movw   $0xa1,-0x12(%ebp)
  10180d:	c6 45 ed 03          	movb   $0x3,-0x13(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101811:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  101815:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  101819:	ee                   	out    %al,(%dx)
}
  10181a:	90                   	nop
  10181b:	66 c7 45 f2 20 00    	movw   $0x20,-0xe(%ebp)
  101821:	c6 45 f1 68          	movb   $0x68,-0xf(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101825:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  101829:	0f b7 55 f2          	movzwl -0xe(%ebp),%edx
  10182d:	ee                   	out    %al,(%dx)
}
  10182e:	90                   	nop
  10182f:	66 c7 45 f6 20 00    	movw   $0x20,-0xa(%ebp)
  101835:	c6 45 f5 0a          	movb   $0xa,-0xb(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101839:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
  10183d:	0f b7 55 f6          	movzwl -0xa(%ebp),%edx
  101841:	ee                   	out    %al,(%dx)
}
  101842:	90                   	nop
  101843:	66 c7 45 fa a0 00    	movw   $0xa0,-0x6(%ebp)
  101849:	c6 45 f9 68          	movb   $0x68,-0x7(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  10184d:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
  101851:	0f b7 55 fa          	movzwl -0x6(%ebp),%edx
  101855:	ee                   	out    %al,(%dx)
}
  101856:	90                   	nop
  101857:	66 c7 45 fe a0 00    	movw   $0xa0,-0x2(%ebp)
  10185d:	c6 45 fd 0a          	movb   $0xa,-0x3(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port));
  101861:	0f b6 45 fd          	movzbl -0x3(%ebp),%eax
  101865:	0f b7 55 fe          	movzwl -0x2(%ebp),%edx
  101869:	ee                   	out    %al,(%dx)
}
  10186a:	90                   	nop
    outb(IO_PIC1, 0x0a);    // read IRR by default

    outb(IO_PIC2, 0x68);    // OCW3
    outb(IO_PIC2, 0x0a);    // OCW3

    if (irq_mask != 0xFFFF) {
  10186b:	0f b7 05 50 f5 10 00 	movzwl 0x10f550,%eax
  101872:	3d ff ff 00 00       	cmp    $0xffff,%eax
  101877:	74 0f                	je     101888 <pic_init+0x145>
        pic_setmask(irq_mask);
  101879:	0f b7 05 50 f5 10 00 	movzwl 0x10f550,%eax
  101880:	89 04 24             	mov    %eax,(%esp)
  101883:	e8 29 fe ff ff       	call   1016b1 <pic_setmask>
    }
}
  101888:	90                   	nop
  101889:	89 ec                	mov    %ebp,%esp
  10188b:	5d                   	pop    %ebp
  10188c:	c3                   	ret    

0010188d <print_ticks>:
#include <console.h>
#include <kdebug.h>
#include<string.h>
#define TICK_NUM 100

static void print_ticks() {
  10188d:	55                   	push   %ebp
  10188e:	89 e5                	mov    %esp,%ebp
  101890:	83 ec 18             	sub    $0x18,%esp
    cprintf("%d ticks\n",TICK_NUM);
  101893:	c7 44 24 04 64 00 00 	movl   $0x64,0x4(%esp)
  10189a:	00 
  10189b:	c7 04 24 20 3a 10 00 	movl   $0x103a20,(%esp)
  1018a2:	e8 89 ea ff ff       	call   100330 <cprintf>
#ifdef DEBUG_GRADE
    cprintf("End of Test.\n");
    panic("EOT: kernel seems ok.");
#endif
}
  1018a7:	90                   	nop
  1018a8:	89 ec                	mov    %ebp,%esp
  1018aa:	5d                   	pop    %ebp
  1018ab:	c3                   	ret    

001018ac <idt_init>:
    sizeof(idt) - 1, (uintptr_t)idt
};

/* idt_init - initialize IDT to each of the entry points in kern/trap/vectors.S */
void
idt_init(void) {
  1018ac:	55                   	push   %ebp
  1018ad:	89 e5                	mov    %esp,%ebp
  1018af:	83 ec 10             	sub    $0x10,%esp
    //set up idt
    // for(int i=0;i<256;i++){
    //     SETGATE(idt[i],0,0,__vectors[i],0)
    // }
    int i;
    for (i = 0; i < sizeof(idt) / sizeof(struct gatedesc); i++){
  1018b2:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
  1018b9:	e9 c4 00 00 00       	jmp    101982 <idt_init+0xd6>
        SETGATE(idt[i],0,GD_KTEXT,__vectors[i],DPL_KERNEL);
  1018be:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1018c1:	8b 04 85 e0 f5 10 00 	mov    0x10f5e0(,%eax,4),%eax
  1018c8:	0f b7 d0             	movzwl %ax,%edx
  1018cb:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1018ce:	66 89 14 c5 c0 00 11 	mov    %dx,0x1100c0(,%eax,8)
  1018d5:	00 
  1018d6:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1018d9:	66 c7 04 c5 c2 00 11 	movw   $0x8,0x1100c2(,%eax,8)
  1018e0:	00 08 00 
  1018e3:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1018e6:	0f b6 14 c5 c4 00 11 	movzbl 0x1100c4(,%eax,8),%edx
  1018ed:	00 
  1018ee:	80 e2 e0             	and    $0xe0,%dl
  1018f1:	88 14 c5 c4 00 11 00 	mov    %dl,0x1100c4(,%eax,8)
  1018f8:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1018fb:	0f b6 14 c5 c4 00 11 	movzbl 0x1100c4(,%eax,8),%edx
  101902:	00 
  101903:	80 e2 1f             	and    $0x1f,%dl
  101906:	88 14 c5 c4 00 11 00 	mov    %dl,0x1100c4(,%eax,8)
  10190d:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101910:	0f b6 14 c5 c5 00 11 	movzbl 0x1100c5(,%eax,8),%edx
  101917:	00 
  101918:	80 e2 f0             	and    $0xf0,%dl
  10191b:	80 ca 0e             	or     $0xe,%dl
  10191e:	88 14 c5 c5 00 11 00 	mov    %dl,0x1100c5(,%eax,8)
  101925:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101928:	0f b6 14 c5 c5 00 11 	movzbl 0x1100c5(,%eax,8),%edx
  10192f:	00 
  101930:	80 e2 ef             	and    $0xef,%dl
  101933:	88 14 c5 c5 00 11 00 	mov    %dl,0x1100c5(,%eax,8)
  10193a:	8b 45 fc             	mov    -0x4(%ebp),%eax
  10193d:	0f b6 14 c5 c5 00 11 	movzbl 0x1100c5(,%eax,8),%edx
  101944:	00 
  101945:	80 e2 9f             	and    $0x9f,%dl
  101948:	88 14 c5 c5 00 11 00 	mov    %dl,0x1100c5(,%eax,8)
  10194f:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101952:	0f b6 14 c5 c5 00 11 	movzbl 0x1100c5(,%eax,8),%edx
  101959:	00 
  10195a:	80 ca 80             	or     $0x80,%dl
  10195d:	88 14 c5 c5 00 11 00 	mov    %dl,0x1100c5(,%eax,8)
  101964:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101967:	8b 04 85 e0 f5 10 00 	mov    0x10f5e0(,%eax,4),%eax
  10196e:	c1 e8 10             	shr    $0x10,%eax
  101971:	0f b7 d0             	movzwl %ax,%edx
  101974:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101977:	66 89 14 c5 c6 00 11 	mov    %dx,0x1100c6(,%eax,8)
  10197e:	00 
    for (i = 0; i < sizeof(idt) / sizeof(struct gatedesc); i++){
  10197f:	ff 45 fc             	incl   -0x4(%ebp)
  101982:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101985:	3d ff 00 00 00       	cmp    $0xff,%eax
  10198a:	0f 86 2e ff ff ff    	jbe    1018be <idt_init+0x12>
    }
    SETGATE(idt[T_SWITCH_TOK], 0, GD_KTEXT, __vectors[T_SWITCH_TOK], DPL_USER);
  101990:	a1 c4 f7 10 00       	mov    0x10f7c4,%eax
  101995:	0f b7 c0             	movzwl %ax,%eax
  101998:	66 a3 88 04 11 00    	mov    %ax,0x110488
  10199e:	66 c7 05 8a 04 11 00 	movw   $0x8,0x11048a
  1019a5:	08 00 
  1019a7:	0f b6 05 8c 04 11 00 	movzbl 0x11048c,%eax
  1019ae:	24 e0                	and    $0xe0,%al
  1019b0:	a2 8c 04 11 00       	mov    %al,0x11048c
  1019b5:	0f b6 05 8c 04 11 00 	movzbl 0x11048c,%eax
  1019bc:	24 1f                	and    $0x1f,%al
  1019be:	a2 8c 04 11 00       	mov    %al,0x11048c
  1019c3:	0f b6 05 8d 04 11 00 	movzbl 0x11048d,%eax
  1019ca:	24 f0                	and    $0xf0,%al
  1019cc:	0c 0e                	or     $0xe,%al
  1019ce:	a2 8d 04 11 00       	mov    %al,0x11048d
  1019d3:	0f b6 05 8d 04 11 00 	movzbl 0x11048d,%eax
  1019da:	24 ef                	and    $0xef,%al
  1019dc:	a2 8d 04 11 00       	mov    %al,0x11048d
  1019e1:	0f b6 05 8d 04 11 00 	movzbl 0x11048d,%eax
  1019e8:	0c 60                	or     $0x60,%al
  1019ea:	a2 8d 04 11 00       	mov    %al,0x11048d
  1019ef:	0f b6 05 8d 04 11 00 	movzbl 0x11048d,%eax
  1019f6:	0c 80                	or     $0x80,%al
  1019f8:	a2 8d 04 11 00       	mov    %al,0x11048d
  1019fd:	a1 c4 f7 10 00       	mov    0x10f7c4,%eax
  101a02:	c1 e8 10             	shr    $0x10,%eax
  101a05:	0f b7 c0             	movzwl %ax,%eax
  101a08:	66 a3 8e 04 11 00    	mov    %ax,0x11048e
  101a0e:	c7 45 f8 60 f5 10 00 	movl   $0x10f560,-0x8(%ebp)
    asm volatile ("lidt (%0)" :: "r" (pd));
  101a15:	8b 45 f8             	mov    -0x8(%ebp),%eax
  101a18:	0f 01 18             	lidtl  (%eax)
}
  101a1b:	90                   	nop
    lidt(&idt_pd);
}
  101a1c:	90                   	nop
  101a1d:	89 ec                	mov    %ebp,%esp
  101a1f:	5d                   	pop    %ebp
  101a20:	c3                   	ret    

00101a21 <trapname>:

static const char *
trapname(int trapno) {
  101a21:	55                   	push   %ebp
  101a22:	89 e5                	mov    %esp,%ebp
        "Alignment Check",
        "Machine-Check",
        "SIMD Floating-Point Exception"
    };

    if (trapno < sizeof(excnames)/sizeof(const char * const)) {
  101a24:	8b 45 08             	mov    0x8(%ebp),%eax
  101a27:	83 f8 13             	cmp    $0x13,%eax
  101a2a:	77 0c                	ja     101a38 <trapname+0x17>
        return excnames[trapno];
  101a2c:	8b 45 08             	mov    0x8(%ebp),%eax
  101a2f:	8b 04 85 80 3d 10 00 	mov    0x103d80(,%eax,4),%eax
  101a36:	eb 18                	jmp    101a50 <trapname+0x2f>
    }
    if (trapno >= IRQ_OFFSET && trapno < IRQ_OFFSET + 16) {
  101a38:	83 7d 08 1f          	cmpl   $0x1f,0x8(%ebp)
  101a3c:	7e 0d                	jle    101a4b <trapname+0x2a>
  101a3e:	83 7d 08 2f          	cmpl   $0x2f,0x8(%ebp)
  101a42:	7f 07                	jg     101a4b <trapname+0x2a>
        return "Hardware Interrupt";
  101a44:	b8 2a 3a 10 00       	mov    $0x103a2a,%eax
  101a49:	eb 05                	jmp    101a50 <trapname+0x2f>
    }
    return "(unknown trap)";
  101a4b:	b8 3d 3a 10 00       	mov    $0x103a3d,%eax
}
  101a50:	5d                   	pop    %ebp
  101a51:	c3                   	ret    

00101a52 <trap_in_kernel>:

/* trap_in_kernel - test if trap happened in kernel */
bool
trap_in_kernel(struct trapframe *tf) {
  101a52:	55                   	push   %ebp
  101a53:	89 e5                	mov    %esp,%ebp
    return (tf->tf_cs == (uint16_t)KERNEL_CS);
  101a55:	8b 45 08             	mov    0x8(%ebp),%eax
  101a58:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101a5c:	83 f8 08             	cmp    $0x8,%eax
  101a5f:	0f 94 c0             	sete   %al
  101a62:	0f b6 c0             	movzbl %al,%eax
}
  101a65:	5d                   	pop    %ebp
  101a66:	c3                   	ret    

00101a67 <print_trapframe>:
    "TF", "IF", "DF", "OF", NULL, NULL, "NT", NULL,
    "RF", "VM", "AC", "VIF", "VIP", "ID", NULL, NULL,
};

void
print_trapframe(struct trapframe *tf) {
  101a67:	55                   	push   %ebp
  101a68:	89 e5                	mov    %esp,%ebp
  101a6a:	83 ec 28             	sub    $0x28,%esp
    cprintf("trapframe at %p\n", tf);
  101a6d:	8b 45 08             	mov    0x8(%ebp),%eax
  101a70:	89 44 24 04          	mov    %eax,0x4(%esp)
  101a74:	c7 04 24 7e 3a 10 00 	movl   $0x103a7e,(%esp)
  101a7b:	e8 b0 e8 ff ff       	call   100330 <cprintf>
    print_regs(&tf->tf_regs);
  101a80:	8b 45 08             	mov    0x8(%ebp),%eax
  101a83:	89 04 24             	mov    %eax,(%esp)
  101a86:	e8 8f 01 00 00       	call   101c1a <print_regs>
    cprintf("  ds   0x----%04x\n", tf->tf_ds);
  101a8b:	8b 45 08             	mov    0x8(%ebp),%eax
  101a8e:	0f b7 40 2c          	movzwl 0x2c(%eax),%eax
  101a92:	89 44 24 04          	mov    %eax,0x4(%esp)
  101a96:	c7 04 24 8f 3a 10 00 	movl   $0x103a8f,(%esp)
  101a9d:	e8 8e e8 ff ff       	call   100330 <cprintf>
    cprintf("  es   0x----%04x\n", tf->tf_es);
  101aa2:	8b 45 08             	mov    0x8(%ebp),%eax
  101aa5:	0f b7 40 28          	movzwl 0x28(%eax),%eax
  101aa9:	89 44 24 04          	mov    %eax,0x4(%esp)
  101aad:	c7 04 24 a2 3a 10 00 	movl   $0x103aa2,(%esp)
  101ab4:	e8 77 e8 ff ff       	call   100330 <cprintf>
    cprintf("  fs   0x----%04x\n", tf->tf_fs);
  101ab9:	8b 45 08             	mov    0x8(%ebp),%eax
  101abc:	0f b7 40 24          	movzwl 0x24(%eax),%eax
  101ac0:	89 44 24 04          	mov    %eax,0x4(%esp)
  101ac4:	c7 04 24 b5 3a 10 00 	movl   $0x103ab5,(%esp)
  101acb:	e8 60 e8 ff ff       	call   100330 <cprintf>
    cprintf("  gs   0x----%04x\n", tf->tf_gs);
  101ad0:	8b 45 08             	mov    0x8(%ebp),%eax
  101ad3:	0f b7 40 20          	movzwl 0x20(%eax),%eax
  101ad7:	89 44 24 04          	mov    %eax,0x4(%esp)
  101adb:	c7 04 24 c8 3a 10 00 	movl   $0x103ac8,(%esp)
  101ae2:	e8 49 e8 ff ff       	call   100330 <cprintf>
    cprintf("  trap 0x%08x %s\n", tf->tf_trapno, trapname(tf->tf_trapno));
  101ae7:	8b 45 08             	mov    0x8(%ebp),%eax
  101aea:	8b 40 30             	mov    0x30(%eax),%eax
  101aed:	89 04 24             	mov    %eax,(%esp)
  101af0:	e8 2c ff ff ff       	call   101a21 <trapname>
  101af5:	8b 55 08             	mov    0x8(%ebp),%edx
  101af8:	8b 52 30             	mov    0x30(%edx),%edx
  101afb:	89 44 24 08          	mov    %eax,0x8(%esp)
  101aff:	89 54 24 04          	mov    %edx,0x4(%esp)
  101b03:	c7 04 24 db 3a 10 00 	movl   $0x103adb,(%esp)
  101b0a:	e8 21 e8 ff ff       	call   100330 <cprintf>
    cprintf("  err  0x%08x\n", tf->tf_err);
  101b0f:	8b 45 08             	mov    0x8(%ebp),%eax
  101b12:	8b 40 34             	mov    0x34(%eax),%eax
  101b15:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b19:	c7 04 24 ed 3a 10 00 	movl   $0x103aed,(%esp)
  101b20:	e8 0b e8 ff ff       	call   100330 <cprintf>
    cprintf("  eip  0x%08x\n", tf->tf_eip);
  101b25:	8b 45 08             	mov    0x8(%ebp),%eax
  101b28:	8b 40 38             	mov    0x38(%eax),%eax
  101b2b:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b2f:	c7 04 24 fc 3a 10 00 	movl   $0x103afc,(%esp)
  101b36:	e8 f5 e7 ff ff       	call   100330 <cprintf>
    cprintf("  cs   0x----%04x\n", tf->tf_cs);
  101b3b:	8b 45 08             	mov    0x8(%ebp),%eax
  101b3e:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101b42:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b46:	c7 04 24 0b 3b 10 00 	movl   $0x103b0b,(%esp)
  101b4d:	e8 de e7 ff ff       	call   100330 <cprintf>
    cprintf("  flag 0x%08x ", tf->tf_eflags);
  101b52:	8b 45 08             	mov    0x8(%ebp),%eax
  101b55:	8b 40 40             	mov    0x40(%eax),%eax
  101b58:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b5c:	c7 04 24 1e 3b 10 00 	movl   $0x103b1e,(%esp)
  101b63:	e8 c8 e7 ff ff       	call   100330 <cprintf>

    int i, j;
    for (i = 0, j = 1; i < sizeof(IA32flags) / sizeof(IA32flags[0]); i ++, j <<= 1) {
  101b68:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  101b6f:	c7 45 f0 01 00 00 00 	movl   $0x1,-0x10(%ebp)
  101b76:	eb 3d                	jmp    101bb5 <print_trapframe+0x14e>
        if ((tf->tf_eflags & j) && IA32flags[i] != NULL) {
  101b78:	8b 45 08             	mov    0x8(%ebp),%eax
  101b7b:	8b 50 40             	mov    0x40(%eax),%edx
  101b7e:	8b 45 f0             	mov    -0x10(%ebp),%eax
  101b81:	21 d0                	and    %edx,%eax
  101b83:	85 c0                	test   %eax,%eax
  101b85:	74 28                	je     101baf <print_trapframe+0x148>
  101b87:	8b 45 f4             	mov    -0xc(%ebp),%eax
  101b8a:	8b 04 85 80 f5 10 00 	mov    0x10f580(,%eax,4),%eax
  101b91:	85 c0                	test   %eax,%eax
  101b93:	74 1a                	je     101baf <print_trapframe+0x148>
            cprintf("%s,", IA32flags[i]);
  101b95:	8b 45 f4             	mov    -0xc(%ebp),%eax
  101b98:	8b 04 85 80 f5 10 00 	mov    0x10f580(,%eax,4),%eax
  101b9f:	89 44 24 04          	mov    %eax,0x4(%esp)
  101ba3:	c7 04 24 2d 3b 10 00 	movl   $0x103b2d,(%esp)
  101baa:	e8 81 e7 ff ff       	call   100330 <cprintf>
    for (i = 0, j = 1; i < sizeof(IA32flags) / sizeof(IA32flags[0]); i ++, j <<= 1) {
  101baf:	ff 45 f4             	incl   -0xc(%ebp)
  101bb2:	d1 65 f0             	shll   -0x10(%ebp)
  101bb5:	8b 45 f4             	mov    -0xc(%ebp),%eax
  101bb8:	83 f8 17             	cmp    $0x17,%eax
  101bbb:	76 bb                	jbe    101b78 <print_trapframe+0x111>
        }
    }
    cprintf("IOPL=%d\n", (tf->tf_eflags & FL_IOPL_MASK) >> 12);
  101bbd:	8b 45 08             	mov    0x8(%ebp),%eax
  101bc0:	8b 40 40             	mov    0x40(%eax),%eax
  101bc3:	c1 e8 0c             	shr    $0xc,%eax
  101bc6:	83 e0 03             	and    $0x3,%eax
  101bc9:	89 44 24 04          	mov    %eax,0x4(%esp)
  101bcd:	c7 04 24 31 3b 10 00 	movl   $0x103b31,(%esp)
  101bd4:	e8 57 e7 ff ff       	call   100330 <cprintf>

    if (!trap_in_kernel(tf)) {
  101bd9:	8b 45 08             	mov    0x8(%ebp),%eax
  101bdc:	89 04 24             	mov    %eax,(%esp)
  101bdf:	e8 6e fe ff ff       	call   101a52 <trap_in_kernel>
  101be4:	85 c0                	test   %eax,%eax
  101be6:	75 2d                	jne    101c15 <print_trapframe+0x1ae>
        cprintf("  esp  0x%08x\n", tf->tf_esp);
  101be8:	8b 45 08             	mov    0x8(%ebp),%eax
  101beb:	8b 40 44             	mov    0x44(%eax),%eax
  101bee:	89 44 24 04          	mov    %eax,0x4(%esp)
  101bf2:	c7 04 24 3a 3b 10 00 	movl   $0x103b3a,(%esp)
  101bf9:	e8 32 e7 ff ff       	call   100330 <cprintf>
        cprintf("  ss   0x----%04x\n", tf->tf_ss);
  101bfe:	8b 45 08             	mov    0x8(%ebp),%eax
  101c01:	0f b7 40 48          	movzwl 0x48(%eax),%eax
  101c05:	89 44 24 04          	mov    %eax,0x4(%esp)
  101c09:	c7 04 24 49 3b 10 00 	movl   $0x103b49,(%esp)
  101c10:	e8 1b e7 ff ff       	call   100330 <cprintf>
    }
}
  101c15:	90                   	nop
  101c16:	89 ec                	mov    %ebp,%esp
  101c18:	5d                   	pop    %ebp
  101c19:	c3                   	ret    

00101c1a <print_regs>:

void
print_regs(struct pushregs *regs) {
  101c1a:	55                   	push   %ebp
  101c1b:	89 e5                	mov    %esp,%ebp
  101c1d:	83 ec 18             	sub    $0x18,%esp
    cprintf("  edi  0x%08x\n", regs->reg_edi);
  101c20:	8b 45 08             	mov    0x8(%ebp),%eax
  101c23:	8b 00                	mov    (%eax),%eax
  101c25:	89 44 24 04          	mov    %eax,0x4(%esp)
  101c29:	c7 04 24 5c 3b 10 00 	movl   $0x103b5c,(%esp)
  101c30:	e8 fb e6 ff ff       	call   100330 <cprintf>
    cprintf("  esi  0x%08x\n", regs->reg_esi);
  101c35:	8b 45 08             	mov    0x8(%ebp),%eax
  101c38:	8b 40 04             	mov    0x4(%eax),%eax
  101c3b:	89 44 24 04          	mov    %eax,0x4(%esp)
  101c3f:	c7 04 24 6b 3b 10 00 	movl   $0x103b6b,(%esp)
  101c46:	e8 e5 e6 ff ff       	call   100330 <cprintf>
    cprintf("  ebp  0x%08x\n", regs->reg_ebp);
  101c4b:	8b 45 08             	mov    0x8(%ebp),%eax
  101c4e:	8b 40 08             	mov    0x8(%eax),%eax
  101c51:	89 44 24 04          	mov    %eax,0x4(%esp)
  101c55:	c7 04 24 7a 3b 10 00 	movl   $0x103b7a,(%esp)
  101c5c:	e8 cf e6 ff ff       	call   100330 <cprintf>
    cprintf("  oesp 0x%08x\n", regs->reg_oesp);
  101c61:	8b 45 08             	mov    0x8(%ebp),%eax
  101c64:	8b 40 0c             	mov    0xc(%eax),%eax
  101c67:	89 44 24 04          	mov    %eax,0x4(%esp)
  101c6b:	c7 04 24 89 3b 10 00 	movl   $0x103b89,(%esp)
  101c72:	e8 b9 e6 ff ff       	call   100330 <cprintf>
    cprintf("  ebx  0x%08x\n", regs->reg_ebx);
  101c77:	8b 45 08             	mov    0x8(%ebp),%eax
  101c7a:	8b 40 10             	mov    0x10(%eax),%eax
  101c7d:	89 44 24 04          	mov    %eax,0x4(%esp)
  101c81:	c7 04 24 98 3b 10 00 	movl   $0x103b98,(%esp)
  101c88:	e8 a3 e6 ff ff       	call   100330 <cprintf>
    cprintf("  edx  0x%08x\n", regs->reg_edx);
  101c8d:	8b 45 08             	mov    0x8(%ebp),%eax
  101c90:	8b 40 14             	mov    0x14(%eax),%eax
  101c93:	89 44 24 04          	mov    %eax,0x4(%esp)
  101c97:	c7 04 24 a7 3b 10 00 	movl   $0x103ba7,(%esp)
  101c9e:	e8 8d e6 ff ff       	call   100330 <cprintf>
    cprintf("  ecx  0x%08x\n", regs->reg_ecx);
  101ca3:	8b 45 08             	mov    0x8(%ebp),%eax
  101ca6:	8b 40 18             	mov    0x18(%eax),%eax
  101ca9:	89 44 24 04          	mov    %eax,0x4(%esp)
  101cad:	c7 04 24 b6 3b 10 00 	movl   $0x103bb6,(%esp)
  101cb4:	e8 77 e6 ff ff       	call   100330 <cprintf>
    cprintf("  eax  0x%08x\n", regs->reg_eax);
  101cb9:	8b 45 08             	mov    0x8(%ebp),%eax
  101cbc:	8b 40 1c             	mov    0x1c(%eax),%eax
  101cbf:	89 44 24 04          	mov    %eax,0x4(%esp)
  101cc3:	c7 04 24 c5 3b 10 00 	movl   $0x103bc5,(%esp)
  101cca:	e8 61 e6 ff ff       	call   100330 <cprintf>
}
  101ccf:	90                   	nop
  101cd0:	89 ec                	mov    %ebp,%esp
  101cd2:	5d                   	pop    %ebp
  101cd3:	c3                   	ret    

00101cd4 <trap_dispatch>:

struct trapframe *switchu2k;

/* trap_dispatch - dispatch based on what type of trap occurred */
static void
trap_dispatch(struct trapframe *tf) {
  101cd4:	55                   	push   %ebp
  101cd5:	89 e5                	mov    %esp,%ebp
  101cd7:	83 ec 28             	sub    $0x28,%esp
    char c;
    static tickcount = 0;
    static tickcount1 = 0;
    switch (tf->tf_trapno) {
  101cda:	8b 45 08             	mov    0x8(%ebp),%eax
  101cdd:	8b 40 30             	mov    0x30(%eax),%eax
  101ce0:	83 f8 79             	cmp    $0x79,%eax
  101ce3:	0f 84 3b 02 00 00    	je     101f24 <trap_dispatch+0x250>
  101ce9:	83 f8 79             	cmp    $0x79,%eax
  101cec:	0f 87 73 02 00 00    	ja     101f65 <trap_dispatch+0x291>
  101cf2:	83 f8 78             	cmp    $0x78,%eax
  101cf5:	0f 84 c7 01 00 00    	je     101ec2 <trap_dispatch+0x1ee>
  101cfb:	83 f8 78             	cmp    $0x78,%eax
  101cfe:	0f 87 61 02 00 00    	ja     101f65 <trap_dispatch+0x291>
  101d04:	83 f8 2f             	cmp    $0x2f,%eax
  101d07:	0f 87 58 02 00 00    	ja     101f65 <trap_dispatch+0x291>
  101d0d:	83 f8 2e             	cmp    $0x2e,%eax
  101d10:	0f 83 84 02 00 00    	jae    101f9a <trap_dispatch+0x2c6>
  101d16:	83 f8 24             	cmp    $0x24,%eax
  101d19:	74 45                	je     101d60 <trap_dispatch+0x8c>
  101d1b:	83 f8 24             	cmp    $0x24,%eax
  101d1e:	0f 87 41 02 00 00    	ja     101f65 <trap_dispatch+0x291>
  101d24:	83 f8 20             	cmp    $0x20,%eax
  101d27:	74 0a                	je     101d33 <trap_dispatch+0x5f>
  101d29:	83 f8 21             	cmp    $0x21,%eax
  101d2c:	74 5b                	je     101d89 <trap_dispatch+0xb5>
  101d2e:	e9 32 02 00 00       	jmp    101f65 <trap_dispatch+0x291>
        /* handle the timer interrupt */
        /* (1) After a timer interrupt, you should record this event using a global variable (increase it), such as ticks in kern/driver/clock.c
         * (2) Every TICK_NUM cycle, you can print some info using a funciton, such as print_ticks().
         * (3) Too Simple? Yes, I think so!
         */
        tickcount+=1;
  101d33:	a1 c0 08 11 00       	mov    0x1108c0,%eax
  101d38:	40                   	inc    %eax
  101d39:	a3 c0 08 11 00       	mov    %eax,0x1108c0
        if(tickcount==TICK_NUM){
  101d3e:	a1 c0 08 11 00       	mov    0x1108c0,%eax
  101d43:	83 f8 64             	cmp    $0x64,%eax
  101d46:	0f 85 51 02 00 00    	jne    101f9d <trap_dispatch+0x2c9>
            tickcount = 0;
  101d4c:	c7 05 c0 08 11 00 00 	movl   $0x0,0x1108c0
  101d53:	00 00 00 
            print_ticks();
  101d56:	e8 32 fb ff ff       	call   10188d <print_ticks>
        }
        break;
  101d5b:	e9 3d 02 00 00       	jmp    101f9d <trap_dispatch+0x2c9>
    case IRQ_OFFSET + IRQ_COM1:
        c = cons_getc();
  101d60:	e8 de f8 ff ff       	call   101643 <cons_getc>
  101d65:	88 45 f7             	mov    %al,-0x9(%ebp)
        cprintf("serial [%03d] %c\n", c, c);
  101d68:	0f be 55 f7          	movsbl -0x9(%ebp),%edx
  101d6c:	0f be 45 f7          	movsbl -0x9(%ebp),%eax
  101d70:	89 54 24 08          	mov    %edx,0x8(%esp)
  101d74:	89 44 24 04          	mov    %eax,0x4(%esp)
  101d78:	c7 04 24 d4 3b 10 00 	movl   $0x103bd4,(%esp)
  101d7f:	e8 ac e5 ff ff       	call   100330 <cprintf>
        break;
  101d84:	e9 21 02 00 00       	jmp    101faa <trap_dispatch+0x2d6>
    case IRQ_OFFSET + IRQ_KBD:
        c = cons_getc();
  101d89:	e8 b5 f8 ff ff       	call   101643 <cons_getc>
  101d8e:	88 45 f7             	mov    %al,-0x9(%ebp)
        // cprintf("kbd [%03d] %c\n", c, c);
        // break;
        
        if(c == '3'){
  101d91:	80 7d f7 33          	cmpb   $0x33,-0x9(%ebp)
  101d95:	75 62                	jne    101df9 <trap_dispatch+0x125>
            //     "movl %%ebp, %%esp"
            //     :
            //     : "i"(T_SWITCH_TOU)
            // );
            // break;
            if (tf->tf_cs != USER_CS) {
  101d97:	8b 45 08             	mov    0x8(%ebp),%eax
  101d9a:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101d9e:	83 f8 1b             	cmp    $0x1b,%eax
  101da1:	0f 84 f9 01 00 00    	je     101fa0 <trap_dispatch+0x2cc>
                tf->tf_cs = USER_CS;
  101da7:	8b 45 08             	mov    0x8(%ebp),%eax
  101daa:	66 c7 40 3c 1b 00    	movw   $0x1b,0x3c(%eax)
                tf->tf_ds = tf->tf_es = tf->tf_ss = USER_DS;
  101db0:	8b 45 08             	mov    0x8(%ebp),%eax
  101db3:	66 c7 40 48 23 00    	movw   $0x23,0x48(%eax)
  101db9:	8b 45 08             	mov    0x8(%ebp),%eax
  101dbc:	0f b7 50 48          	movzwl 0x48(%eax),%edx
  101dc0:	8b 45 08             	mov    0x8(%ebp),%eax
  101dc3:	66 89 50 28          	mov    %dx,0x28(%eax)
  101dc7:	8b 45 08             	mov    0x8(%ebp),%eax
  101dca:	0f b7 50 28          	movzwl 0x28(%eax),%edx
  101dce:	8b 45 08             	mov    0x8(%ebp),%eax
  101dd1:	66 89 50 2c          	mov    %dx,0x2c(%eax)
                tf->tf_eflags |= FL_IOPL_MASK;
  101dd5:	8b 45 08             	mov    0x8(%ebp),%eax
  101dd8:	8b 40 40             	mov    0x40(%eax),%eax
  101ddb:	0d 00 30 00 00       	or     $0x3000,%eax
  101de0:	89 c2                	mov    %eax,%edx
  101de2:	8b 45 08             	mov    0x8(%ebp),%eax
  101de5:	89 50 40             	mov    %edx,0x40(%eax)
                tf->tf_esp = (uint32_t)tf + sizeof(struct trapframe) - 8;
  101de8:	8b 45 08             	mov    0x8(%ebp),%eax
  101deb:	8d 50 44             	lea    0x44(%eax),%edx
  101dee:	8b 45 08             	mov    0x8(%ebp),%eax
  101df1:	89 50 44             	mov    %edx,0x44(%eax)
            }
            break;
  101df4:	e9 a7 01 00 00       	jmp    101fa0 <trap_dispatch+0x2cc>

        }
        else if(c == '0'){
  101df9:	80 7d f7 30          	cmpb   $0x30,-0x9(%ebp)
  101dfd:	0f 85 80 00 00 00    	jne    101e83 <trap_dispatch+0x1af>
            //     "int %0 \n"
            //     "movl %%ebp, %%esp \n"
            //     :
            //     : "i"(T_SWITCH_TOK)
            // );
            if (tf->tf_cs != KERNEL_CS) {
  101e03:	8b 45 08             	mov    0x8(%ebp),%eax
  101e06:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101e0a:	83 f8 08             	cmp    $0x8,%eax
  101e0d:	0f 84 90 01 00 00    	je     101fa3 <trap_dispatch+0x2cf>
                tf->tf_cs = KERNEL_CS;
  101e13:	8b 45 08             	mov    0x8(%ebp),%eax
  101e16:	66 c7 40 3c 08 00    	movw   $0x8,0x3c(%eax)
                tf->tf_ds = tf->tf_es = KERNEL_DS;
  101e1c:	8b 45 08             	mov    0x8(%ebp),%eax
  101e1f:	66 c7 40 28 10 00    	movw   $0x10,0x28(%eax)
  101e25:	8b 45 08             	mov    0x8(%ebp),%eax
  101e28:	0f b7 50 28          	movzwl 0x28(%eax),%edx
  101e2c:	8b 45 08             	mov    0x8(%ebp),%eax
  101e2f:	66 89 50 2c          	mov    %dx,0x2c(%eax)
                tf->tf_eflags &= ~FL_IOPL_MASK;
  101e33:	8b 45 08             	mov    0x8(%ebp),%eax
  101e36:	8b 40 40             	mov    0x40(%eax),%eax
  101e39:	25 ff cf ff ff       	and    $0xffffcfff,%eax
  101e3e:	89 c2                	mov    %eax,%edx
  101e40:	8b 45 08             	mov    0x8(%ebp),%eax
  101e43:	89 50 40             	mov    %edx,0x40(%eax)
                switchu2k = (struct trapframe *)(tf->tf_esp - (sizeof(struct trapframe) - 8));
  101e46:	8b 45 08             	mov    0x8(%ebp),%eax
  101e49:	8b 40 44             	mov    0x44(%eax),%eax
  101e4c:	83 e8 44             	sub    $0x44,%eax
  101e4f:	a3 a0 00 11 00       	mov    %eax,0x1100a0
                memmove(switchu2k, tf, sizeof(struct trapframe) - 8);
  101e54:	a1 a0 00 11 00       	mov    0x1100a0,%eax
  101e59:	c7 44 24 08 44 00 00 	movl   $0x44,0x8(%esp)
  101e60:	00 
  101e61:	8b 55 08             	mov    0x8(%ebp),%edx
  101e64:	89 54 24 04          	mov    %edx,0x4(%esp)
  101e68:	89 04 24             	mov    %eax,(%esp)
  101e6b:	e8 06 17 00 00       	call   103576 <memmove>
                *((uint32_t *)tf - 1) = (uint32_t)switchu2k;
  101e70:	8b 15 a0 00 11 00    	mov    0x1100a0,%edx
  101e76:	8b 45 08             	mov    0x8(%ebp),%eax
  101e79:	83 e8 04             	sub    $0x4,%eax
  101e7c:	89 10                	mov    %edx,(%eax)
            }
            break;
  101e7e:	e9 20 01 00 00       	jmp    101fa3 <trap_dispatch+0x2cf>
        }else if(c == 'p'){
  101e83:	80 7d f7 70          	cmpb   $0x70,-0x9(%ebp)
  101e87:	75 18                	jne    101ea1 <trap_dispatch+0x1cd>
            cprintf("trapframe at %p\n", tf); 
  101e89:	8b 45 08             	mov    0x8(%ebp),%eax
  101e8c:	89 44 24 04          	mov    %eax,0x4(%esp)
  101e90:	c7 04 24 7e 3a 10 00 	movl   $0x103a7e,(%esp)
  101e97:	e8 94 e4 ff ff       	call   100330 <cprintf>
            break;
  101e9c:	e9 09 01 00 00       	jmp    101faa <trap_dispatch+0x2d6>
        }else{
            cprintf("kbd [%03d] %c\n", c, c);
  101ea1:	0f be 55 f7          	movsbl -0x9(%ebp),%edx
  101ea5:	0f be 45 f7          	movsbl -0x9(%ebp),%eax
  101ea9:	89 54 24 08          	mov    %edx,0x8(%esp)
  101ead:	89 44 24 04          	mov    %eax,0x4(%esp)
  101eb1:	c7 04 24 e6 3b 10 00 	movl   $0x103be6,(%esp)
  101eb8:	e8 73 e4 ff ff       	call   100330 <cprintf>
            break;
  101ebd:	e9 e8 00 00 00       	jmp    101faa <trap_dispatch+0x2d6>
        }
    //LAB1 CHALLENGE 1 : YOUR CODE you should modify below codes.
    case T_SWITCH_TOU:
        if (tf->tf_cs != USER_CS) {
  101ec2:	8b 45 08             	mov    0x8(%ebp),%eax
  101ec5:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101ec9:	83 f8 1b             	cmp    $0x1b,%eax
  101ecc:	0f 84 d4 00 00 00    	je     101fa6 <trap_dispatch+0x2d2>
            tf->tf_cs = USER_CS;
  101ed2:	8b 45 08             	mov    0x8(%ebp),%eax
  101ed5:	66 c7 40 3c 1b 00    	movw   $0x1b,0x3c(%eax)
            tf->tf_ds = tf->tf_es = tf->tf_ss = USER_DS;
  101edb:	8b 45 08             	mov    0x8(%ebp),%eax
  101ede:	66 c7 40 48 23 00    	movw   $0x23,0x48(%eax)
  101ee4:	8b 45 08             	mov    0x8(%ebp),%eax
  101ee7:	0f b7 50 48          	movzwl 0x48(%eax),%edx
  101eeb:	8b 45 08             	mov    0x8(%ebp),%eax
  101eee:	66 89 50 28          	mov    %dx,0x28(%eax)
  101ef2:	8b 45 08             	mov    0x8(%ebp),%eax
  101ef5:	0f b7 50 28          	movzwl 0x28(%eax),%edx
  101ef9:	8b 45 08             	mov    0x8(%ebp),%eax
  101efc:	66 89 50 2c          	mov    %dx,0x2c(%eax)
            tf->tf_eflags |= FL_IOPL_MASK;
  101f00:	8b 45 08             	mov    0x8(%ebp),%eax
  101f03:	8b 40 40             	mov    0x40(%eax),%eax
  101f06:	0d 00 30 00 00       	or     $0x3000,%eax
  101f0b:	89 c2                	mov    %eax,%edx
  101f0d:	8b 45 08             	mov    0x8(%ebp),%eax
  101f10:	89 50 40             	mov    %edx,0x40(%eax)
            tf->tf_esp = (uint32_t)tf + sizeof(struct trapframe) - 8;
  101f13:	8b 45 08             	mov    0x8(%ebp),%eax
  101f16:	8d 50 44             	lea    0x44(%eax),%edx
  101f19:	8b 45 08             	mov    0x8(%ebp),%eax
  101f1c:	89 50 44             	mov    %edx,0x44(%eax)
        }
        break;
  101f1f:	e9 82 00 00 00       	jmp    101fa6 <trap_dispatch+0x2d2>
    case T_SWITCH_TOK:
        if (tf->tf_cs != KERNEL_CS) {
  101f24:	8b 45 08             	mov    0x8(%ebp),%eax
  101f27:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101f2b:	83 f8 08             	cmp    $0x8,%eax
  101f2e:	74 79                	je     101fa9 <trap_dispatch+0x2d5>
        tf->tf_cs = KERNEL_CS;
  101f30:	8b 45 08             	mov    0x8(%ebp),%eax
  101f33:	66 c7 40 3c 08 00    	movw   $0x8,0x3c(%eax)
        tf->tf_ds = tf->tf_es = KERNEL_DS;
  101f39:	8b 45 08             	mov    0x8(%ebp),%eax
  101f3c:	66 c7 40 28 10 00    	movw   $0x10,0x28(%eax)
  101f42:	8b 45 08             	mov    0x8(%ebp),%eax
  101f45:	0f b7 50 28          	movzwl 0x28(%eax),%edx
  101f49:	8b 45 08             	mov    0x8(%ebp),%eax
  101f4c:	66 89 50 2c          	mov    %dx,0x2c(%eax)
        tf->tf_eflags &= ~FL_IOPL_MASK;
  101f50:	8b 45 08             	mov    0x8(%ebp),%eax
  101f53:	8b 40 40             	mov    0x40(%eax),%eax
  101f56:	25 ff cf ff ff       	and    $0xffffcfff,%eax
  101f5b:	89 c2                	mov    %eax,%edx
  101f5d:	8b 45 08             	mov    0x8(%ebp),%eax
  101f60:	89 50 40             	mov    %edx,0x40(%eax)
        }
        break;
  101f63:	eb 44                	jmp    101fa9 <trap_dispatch+0x2d5>
    case IRQ_OFFSET + IRQ_IDE2:
        /* do nothing */
        break;
    default:
        // in kernel, it must be a mistake
        if ((tf->tf_cs & 3) == 0) {
  101f65:	8b 45 08             	mov    0x8(%ebp),%eax
  101f68:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101f6c:	83 e0 03             	and    $0x3,%eax
  101f6f:	85 c0                	test   %eax,%eax
  101f71:	75 37                	jne    101faa <trap_dispatch+0x2d6>
            print_trapframe(tf);
  101f73:	8b 45 08             	mov    0x8(%ebp),%eax
  101f76:	89 04 24             	mov    %eax,(%esp)
  101f79:	e8 e9 fa ff ff       	call   101a67 <print_trapframe>
            panic("unexpected trap in kernel.\n");
  101f7e:	c7 44 24 08 f5 3b 10 	movl   $0x103bf5,0x8(%esp)
  101f85:	00 
  101f86:	c7 44 24 04 f4 00 00 	movl   $0xf4,0x4(%esp)
  101f8d:	00 
  101f8e:	c7 04 24 11 3c 10 00 	movl   $0x103c11,(%esp)
  101f95:	e8 1e ed ff ff       	call   100cb8 <__panic>
        break;
  101f9a:	90                   	nop
  101f9b:	eb 0d                	jmp    101faa <trap_dispatch+0x2d6>
        break;
  101f9d:	90                   	nop
  101f9e:	eb 0a                	jmp    101faa <trap_dispatch+0x2d6>
            break;
  101fa0:	90                   	nop
  101fa1:	eb 07                	jmp    101faa <trap_dispatch+0x2d6>
            break;
  101fa3:	90                   	nop
  101fa4:	eb 04                	jmp    101faa <trap_dispatch+0x2d6>
        break;
  101fa6:	90                   	nop
  101fa7:	eb 01                	jmp    101faa <trap_dispatch+0x2d6>
        break;
  101fa9:	90                   	nop
        }
    }
}
  101faa:	90                   	nop
  101fab:	89 ec                	mov    %ebp,%esp
  101fad:	5d                   	pop    %ebp
  101fae:	c3                   	ret    

00101faf <trap>:
 * trap - handles or dispatches an exception/interrupt. if and when trap() returns,
 * the code in kern/trap/trapentry.S restores the old CPU state saved in the
 * trapframe and then uses the iret instruction to return from the exception.
 * */
void
trap(struct trapframe *tf) {
  101faf:	55                   	push   %ebp
  101fb0:	89 e5                	mov    %esp,%ebp
  101fb2:	83 ec 18             	sub    $0x18,%esp
    // dispatch based on what type of trap occurred
    trap_dispatch(tf);
  101fb5:	8b 45 08             	mov    0x8(%ebp),%eax
  101fb8:	89 04 24             	mov    %eax,(%esp)
  101fbb:	e8 14 fd ff ff       	call   101cd4 <trap_dispatch>
}
  101fc0:	90                   	nop
  101fc1:	89 ec                	mov    %ebp,%esp
  101fc3:	5d                   	pop    %ebp
  101fc4:	c3                   	ret    

00101fc5 <__alltraps>:
.text
.globl __alltraps
__alltraps:
    # push registers to build a trap frame
    # therefore make the stack look like a struct trapframe
    pushl %ds
  101fc5:	1e                   	push   %ds
    pushl %es
  101fc6:	06                   	push   %es
    pushl %fs
  101fc7:	0f a0                	push   %fs
    pushl %gs
  101fc9:	0f a8                	push   %gs
    pushal
  101fcb:	60                   	pusha  

    # load GD_KDATA into %ds and %es to set up data segments for kernel
    movl $GD_KDATA, %eax
  101fcc:	b8 10 00 00 00       	mov    $0x10,%eax
    movw %ax, %ds
  101fd1:	8e d8                	mov    %eax,%ds
    movw %ax, %es
  101fd3:	8e c0                	mov    %eax,%es

    # push %esp to pass a pointer to the trapframe as an argument to trap()
    pushl %esp
  101fd5:	54                   	push   %esp

    # call trap(tf), where tf=%esp
    call trap
  101fd6:	e8 d4 ff ff ff       	call   101faf <trap>

    # pop the pushed stack pointer
    popl %esp
  101fdb:	5c                   	pop    %esp

00101fdc <__trapret>:

    # return falls through to trapret...
.globl __trapret
__trapret:
    # restore registers from stack
    popal
  101fdc:	61                   	popa   

    # restore %ds, %es, %fs and %gs
    popl %gs
  101fdd:	0f a9                	pop    %gs
    popl %fs
  101fdf:	0f a1                	pop    %fs
    popl %es
  101fe1:	07                   	pop    %es
    popl %ds
  101fe2:	1f                   	pop    %ds

    # get rid of the trap number and error code
    addl $0x8, %esp
  101fe3:	83 c4 08             	add    $0x8,%esp
    iret
  101fe6:	cf                   	iret   

00101fe7 <vector0>:
# handler
.text
.globl __alltraps
.globl vector0
vector0:
  pushl $0
  101fe7:	6a 00                	push   $0x0
  pushl $0
  101fe9:	6a 00                	push   $0x0
  jmp __alltraps
  101feb:	e9 d5 ff ff ff       	jmp    101fc5 <__alltraps>

00101ff0 <vector1>:
.globl vector1
vector1:
  pushl $0
  101ff0:	6a 00                	push   $0x0
  pushl $1
  101ff2:	6a 01                	push   $0x1
  jmp __alltraps
  101ff4:	e9 cc ff ff ff       	jmp    101fc5 <__alltraps>

00101ff9 <vector2>:
.globl vector2
vector2:
  pushl $0
  101ff9:	6a 00                	push   $0x0
  pushl $2
  101ffb:	6a 02                	push   $0x2
  jmp __alltraps
  101ffd:	e9 c3 ff ff ff       	jmp    101fc5 <__alltraps>

00102002 <vector3>:
.globl vector3
vector3:
  pushl $0
  102002:	6a 00                	push   $0x0
  pushl $3
  102004:	6a 03                	push   $0x3
  jmp __alltraps
  102006:	e9 ba ff ff ff       	jmp    101fc5 <__alltraps>

0010200b <vector4>:
.globl vector4
vector4:
  pushl $0
  10200b:	6a 00                	push   $0x0
  pushl $4
  10200d:	6a 04                	push   $0x4
  jmp __alltraps
  10200f:	e9 b1 ff ff ff       	jmp    101fc5 <__alltraps>

00102014 <vector5>:
.globl vector5
vector5:
  pushl $0
  102014:	6a 00                	push   $0x0
  pushl $5
  102016:	6a 05                	push   $0x5
  jmp __alltraps
  102018:	e9 a8 ff ff ff       	jmp    101fc5 <__alltraps>

0010201d <vector6>:
.globl vector6
vector6:
  pushl $0
  10201d:	6a 00                	push   $0x0
  pushl $6
  10201f:	6a 06                	push   $0x6
  jmp __alltraps
  102021:	e9 9f ff ff ff       	jmp    101fc5 <__alltraps>

00102026 <vector7>:
.globl vector7
vector7:
  pushl $0
  102026:	6a 00                	push   $0x0
  pushl $7
  102028:	6a 07                	push   $0x7
  jmp __alltraps
  10202a:	e9 96 ff ff ff       	jmp    101fc5 <__alltraps>

0010202f <vector8>:
.globl vector8
vector8:
  pushl $8
  10202f:	6a 08                	push   $0x8
  jmp __alltraps
  102031:	e9 8f ff ff ff       	jmp    101fc5 <__alltraps>

00102036 <vector9>:
.globl vector9
vector9:
  pushl $0
  102036:	6a 00                	push   $0x0
  pushl $9
  102038:	6a 09                	push   $0x9
  jmp __alltraps
  10203a:	e9 86 ff ff ff       	jmp    101fc5 <__alltraps>

0010203f <vector10>:
.globl vector10
vector10:
  pushl $10
  10203f:	6a 0a                	push   $0xa
  jmp __alltraps
  102041:	e9 7f ff ff ff       	jmp    101fc5 <__alltraps>

00102046 <vector11>:
.globl vector11
vector11:
  pushl $11
  102046:	6a 0b                	push   $0xb
  jmp __alltraps
  102048:	e9 78 ff ff ff       	jmp    101fc5 <__alltraps>

0010204d <vector12>:
.globl vector12
vector12:
  pushl $12
  10204d:	6a 0c                	push   $0xc
  jmp __alltraps
  10204f:	e9 71 ff ff ff       	jmp    101fc5 <__alltraps>

00102054 <vector13>:
.globl vector13
vector13:
  pushl $13
  102054:	6a 0d                	push   $0xd
  jmp __alltraps
  102056:	e9 6a ff ff ff       	jmp    101fc5 <__alltraps>

0010205b <vector14>:
.globl vector14
vector14:
  pushl $14
  10205b:	6a 0e                	push   $0xe
  jmp __alltraps
  10205d:	e9 63 ff ff ff       	jmp    101fc5 <__alltraps>

00102062 <vector15>:
.globl vector15
vector15:
  pushl $0
  102062:	6a 00                	push   $0x0
  pushl $15
  102064:	6a 0f                	push   $0xf
  jmp __alltraps
  102066:	e9 5a ff ff ff       	jmp    101fc5 <__alltraps>

0010206b <vector16>:
.globl vector16
vector16:
  pushl $0
  10206b:	6a 00                	push   $0x0
  pushl $16
  10206d:	6a 10                	push   $0x10
  jmp __alltraps
  10206f:	e9 51 ff ff ff       	jmp    101fc5 <__alltraps>

00102074 <vector17>:
.globl vector17
vector17:
  pushl $17
  102074:	6a 11                	push   $0x11
  jmp __alltraps
  102076:	e9 4a ff ff ff       	jmp    101fc5 <__alltraps>

0010207b <vector18>:
.globl vector18
vector18:
  pushl $0
  10207b:	6a 00                	push   $0x0
  pushl $18
  10207d:	6a 12                	push   $0x12
  jmp __alltraps
  10207f:	e9 41 ff ff ff       	jmp    101fc5 <__alltraps>

00102084 <vector19>:
.globl vector19
vector19:
  pushl $0
  102084:	6a 00                	push   $0x0
  pushl $19
  102086:	6a 13                	push   $0x13
  jmp __alltraps
  102088:	e9 38 ff ff ff       	jmp    101fc5 <__alltraps>

0010208d <vector20>:
.globl vector20
vector20:
  pushl $0
  10208d:	6a 00                	push   $0x0
  pushl $20
  10208f:	6a 14                	push   $0x14
  jmp __alltraps
  102091:	e9 2f ff ff ff       	jmp    101fc5 <__alltraps>

00102096 <vector21>:
.globl vector21
vector21:
  pushl $0
  102096:	6a 00                	push   $0x0
  pushl $21
  102098:	6a 15                	push   $0x15
  jmp __alltraps
  10209a:	e9 26 ff ff ff       	jmp    101fc5 <__alltraps>

0010209f <vector22>:
.globl vector22
vector22:
  pushl $0
  10209f:	6a 00                	push   $0x0
  pushl $22
  1020a1:	6a 16                	push   $0x16
  jmp __alltraps
  1020a3:	e9 1d ff ff ff       	jmp    101fc5 <__alltraps>

001020a8 <vector23>:
.globl vector23
vector23:
  pushl $0
  1020a8:	6a 00                	push   $0x0
  pushl $23
  1020aa:	6a 17                	push   $0x17
  jmp __alltraps
  1020ac:	e9 14 ff ff ff       	jmp    101fc5 <__alltraps>

001020b1 <vector24>:
.globl vector24
vector24:
  pushl $0
  1020b1:	6a 00                	push   $0x0
  pushl $24
  1020b3:	6a 18                	push   $0x18
  jmp __alltraps
  1020b5:	e9 0b ff ff ff       	jmp    101fc5 <__alltraps>

001020ba <vector25>:
.globl vector25
vector25:
  pushl $0
  1020ba:	6a 00                	push   $0x0
  pushl $25
  1020bc:	6a 19                	push   $0x19
  jmp __alltraps
  1020be:	e9 02 ff ff ff       	jmp    101fc5 <__alltraps>

001020c3 <vector26>:
.globl vector26
vector26:
  pushl $0
  1020c3:	6a 00                	push   $0x0
  pushl $26
  1020c5:	6a 1a                	push   $0x1a
  jmp __alltraps
  1020c7:	e9 f9 fe ff ff       	jmp    101fc5 <__alltraps>

001020cc <vector27>:
.globl vector27
vector27:
  pushl $0
  1020cc:	6a 00                	push   $0x0
  pushl $27
  1020ce:	6a 1b                	push   $0x1b
  jmp __alltraps
  1020d0:	e9 f0 fe ff ff       	jmp    101fc5 <__alltraps>

001020d5 <vector28>:
.globl vector28
vector28:
  pushl $0
  1020d5:	6a 00                	push   $0x0
  pushl $28
  1020d7:	6a 1c                	push   $0x1c
  jmp __alltraps
  1020d9:	e9 e7 fe ff ff       	jmp    101fc5 <__alltraps>

001020de <vector29>:
.globl vector29
vector29:
  pushl $0
  1020de:	6a 00                	push   $0x0
  pushl $29
  1020e0:	6a 1d                	push   $0x1d
  jmp __alltraps
  1020e2:	e9 de fe ff ff       	jmp    101fc5 <__alltraps>

001020e7 <vector30>:
.globl vector30
vector30:
  pushl $0
  1020e7:	6a 00                	push   $0x0
  pushl $30
  1020e9:	6a 1e                	push   $0x1e
  jmp __alltraps
  1020eb:	e9 d5 fe ff ff       	jmp    101fc5 <__alltraps>

001020f0 <vector31>:
.globl vector31
vector31:
  pushl $0
  1020f0:	6a 00                	push   $0x0
  pushl $31
  1020f2:	6a 1f                	push   $0x1f
  jmp __alltraps
  1020f4:	e9 cc fe ff ff       	jmp    101fc5 <__alltraps>

001020f9 <vector32>:
.globl vector32
vector32:
  pushl $0
  1020f9:	6a 00                	push   $0x0
  pushl $32
  1020fb:	6a 20                	push   $0x20
  jmp __alltraps
  1020fd:	e9 c3 fe ff ff       	jmp    101fc5 <__alltraps>

00102102 <vector33>:
.globl vector33
vector33:
  pushl $0
  102102:	6a 00                	push   $0x0
  pushl $33
  102104:	6a 21                	push   $0x21
  jmp __alltraps
  102106:	e9 ba fe ff ff       	jmp    101fc5 <__alltraps>

0010210b <vector34>:
.globl vector34
vector34:
  pushl $0
  10210b:	6a 00                	push   $0x0
  pushl $34
  10210d:	6a 22                	push   $0x22
  jmp __alltraps
  10210f:	e9 b1 fe ff ff       	jmp    101fc5 <__alltraps>

00102114 <vector35>:
.globl vector35
vector35:
  pushl $0
  102114:	6a 00                	push   $0x0
  pushl $35
  102116:	6a 23                	push   $0x23
  jmp __alltraps
  102118:	e9 a8 fe ff ff       	jmp    101fc5 <__alltraps>

0010211d <vector36>:
.globl vector36
vector36:
  pushl $0
  10211d:	6a 00                	push   $0x0
  pushl $36
  10211f:	6a 24                	push   $0x24
  jmp __alltraps
  102121:	e9 9f fe ff ff       	jmp    101fc5 <__alltraps>

00102126 <vector37>:
.globl vector37
vector37:
  pushl $0
  102126:	6a 00                	push   $0x0
  pushl $37
  102128:	6a 25                	push   $0x25
  jmp __alltraps
  10212a:	e9 96 fe ff ff       	jmp    101fc5 <__alltraps>

0010212f <vector38>:
.globl vector38
vector38:
  pushl $0
  10212f:	6a 00                	push   $0x0
  pushl $38
  102131:	6a 26                	push   $0x26
  jmp __alltraps
  102133:	e9 8d fe ff ff       	jmp    101fc5 <__alltraps>

00102138 <vector39>:
.globl vector39
vector39:
  pushl $0
  102138:	6a 00                	push   $0x0
  pushl $39
  10213a:	6a 27                	push   $0x27
  jmp __alltraps
  10213c:	e9 84 fe ff ff       	jmp    101fc5 <__alltraps>

00102141 <vector40>:
.globl vector40
vector40:
  pushl $0
  102141:	6a 00                	push   $0x0
  pushl $40
  102143:	6a 28                	push   $0x28
  jmp __alltraps
  102145:	e9 7b fe ff ff       	jmp    101fc5 <__alltraps>

0010214a <vector41>:
.globl vector41
vector41:
  pushl $0
  10214a:	6a 00                	push   $0x0
  pushl $41
  10214c:	6a 29                	push   $0x29
  jmp __alltraps
  10214e:	e9 72 fe ff ff       	jmp    101fc5 <__alltraps>

00102153 <vector42>:
.globl vector42
vector42:
  pushl $0
  102153:	6a 00                	push   $0x0
  pushl $42
  102155:	6a 2a                	push   $0x2a
  jmp __alltraps
  102157:	e9 69 fe ff ff       	jmp    101fc5 <__alltraps>

0010215c <vector43>:
.globl vector43
vector43:
  pushl $0
  10215c:	6a 00                	push   $0x0
  pushl $43
  10215e:	6a 2b                	push   $0x2b
  jmp __alltraps
  102160:	e9 60 fe ff ff       	jmp    101fc5 <__alltraps>

00102165 <vector44>:
.globl vector44
vector44:
  pushl $0
  102165:	6a 00                	push   $0x0
  pushl $44
  102167:	6a 2c                	push   $0x2c
  jmp __alltraps
  102169:	e9 57 fe ff ff       	jmp    101fc5 <__alltraps>

0010216e <vector45>:
.globl vector45
vector45:
  pushl $0
  10216e:	6a 00                	push   $0x0
  pushl $45
  102170:	6a 2d                	push   $0x2d
  jmp __alltraps
  102172:	e9 4e fe ff ff       	jmp    101fc5 <__alltraps>

00102177 <vector46>:
.globl vector46
vector46:
  pushl $0
  102177:	6a 00                	push   $0x0
  pushl $46
  102179:	6a 2e                	push   $0x2e
  jmp __alltraps
  10217b:	e9 45 fe ff ff       	jmp    101fc5 <__alltraps>

00102180 <vector47>:
.globl vector47
vector47:
  pushl $0
  102180:	6a 00                	push   $0x0
  pushl $47
  102182:	6a 2f                	push   $0x2f
  jmp __alltraps
  102184:	e9 3c fe ff ff       	jmp    101fc5 <__alltraps>

00102189 <vector48>:
.globl vector48
vector48:
  pushl $0
  102189:	6a 00                	push   $0x0
  pushl $48
  10218b:	6a 30                	push   $0x30
  jmp __alltraps
  10218d:	e9 33 fe ff ff       	jmp    101fc5 <__alltraps>

00102192 <vector49>:
.globl vector49
vector49:
  pushl $0
  102192:	6a 00                	push   $0x0
  pushl $49
  102194:	6a 31                	push   $0x31
  jmp __alltraps
  102196:	e9 2a fe ff ff       	jmp    101fc5 <__alltraps>

0010219b <vector50>:
.globl vector50
vector50:
  pushl $0
  10219b:	6a 00                	push   $0x0
  pushl $50
  10219d:	6a 32                	push   $0x32
  jmp __alltraps
  10219f:	e9 21 fe ff ff       	jmp    101fc5 <__alltraps>

001021a4 <vector51>:
.globl vector51
vector51:
  pushl $0
  1021a4:	6a 00                	push   $0x0
  pushl $51
  1021a6:	6a 33                	push   $0x33
  jmp __alltraps
  1021a8:	e9 18 fe ff ff       	jmp    101fc5 <__alltraps>

001021ad <vector52>:
.globl vector52
vector52:
  pushl $0
  1021ad:	6a 00                	push   $0x0
  pushl $52
  1021af:	6a 34                	push   $0x34
  jmp __alltraps
  1021b1:	e9 0f fe ff ff       	jmp    101fc5 <__alltraps>

001021b6 <vector53>:
.globl vector53
vector53:
  pushl $0
  1021b6:	6a 00                	push   $0x0
  pushl $53
  1021b8:	6a 35                	push   $0x35
  jmp __alltraps
  1021ba:	e9 06 fe ff ff       	jmp    101fc5 <__alltraps>

001021bf <vector54>:
.globl vector54
vector54:
  pushl $0
  1021bf:	6a 00                	push   $0x0
  pushl $54
  1021c1:	6a 36                	push   $0x36
  jmp __alltraps
  1021c3:	e9 fd fd ff ff       	jmp    101fc5 <__alltraps>

001021c8 <vector55>:
.globl vector55
vector55:
  pushl $0
  1021c8:	6a 00                	push   $0x0
  pushl $55
  1021ca:	6a 37                	push   $0x37
  jmp __alltraps
  1021cc:	e9 f4 fd ff ff       	jmp    101fc5 <__alltraps>

001021d1 <vector56>:
.globl vector56
vector56:
  pushl $0
  1021d1:	6a 00                	push   $0x0
  pushl $56
  1021d3:	6a 38                	push   $0x38
  jmp __alltraps
  1021d5:	e9 eb fd ff ff       	jmp    101fc5 <__alltraps>

001021da <vector57>:
.globl vector57
vector57:
  pushl $0
  1021da:	6a 00                	push   $0x0
  pushl $57
  1021dc:	6a 39                	push   $0x39
  jmp __alltraps
  1021de:	e9 e2 fd ff ff       	jmp    101fc5 <__alltraps>

001021e3 <vector58>:
.globl vector58
vector58:
  pushl $0
  1021e3:	6a 00                	push   $0x0
  pushl $58
  1021e5:	6a 3a                	push   $0x3a
  jmp __alltraps
  1021e7:	e9 d9 fd ff ff       	jmp    101fc5 <__alltraps>

001021ec <vector59>:
.globl vector59
vector59:
  pushl $0
  1021ec:	6a 00                	push   $0x0
  pushl $59
  1021ee:	6a 3b                	push   $0x3b
  jmp __alltraps
  1021f0:	e9 d0 fd ff ff       	jmp    101fc5 <__alltraps>

001021f5 <vector60>:
.globl vector60
vector60:
  pushl $0
  1021f5:	6a 00                	push   $0x0
  pushl $60
  1021f7:	6a 3c                	push   $0x3c
  jmp __alltraps
  1021f9:	e9 c7 fd ff ff       	jmp    101fc5 <__alltraps>

001021fe <vector61>:
.globl vector61
vector61:
  pushl $0
  1021fe:	6a 00                	push   $0x0
  pushl $61
  102200:	6a 3d                	push   $0x3d
  jmp __alltraps
  102202:	e9 be fd ff ff       	jmp    101fc5 <__alltraps>

00102207 <vector62>:
.globl vector62
vector62:
  pushl $0
  102207:	6a 00                	push   $0x0
  pushl $62
  102209:	6a 3e                	push   $0x3e
  jmp __alltraps
  10220b:	e9 b5 fd ff ff       	jmp    101fc5 <__alltraps>

00102210 <vector63>:
.globl vector63
vector63:
  pushl $0
  102210:	6a 00                	push   $0x0
  pushl $63
  102212:	6a 3f                	push   $0x3f
  jmp __alltraps
  102214:	e9 ac fd ff ff       	jmp    101fc5 <__alltraps>

00102219 <vector64>:
.globl vector64
vector64:
  pushl $0
  102219:	6a 00                	push   $0x0
  pushl $64
  10221b:	6a 40                	push   $0x40
  jmp __alltraps
  10221d:	e9 a3 fd ff ff       	jmp    101fc5 <__alltraps>

00102222 <vector65>:
.globl vector65
vector65:
  pushl $0
  102222:	6a 00                	push   $0x0
  pushl $65
  102224:	6a 41                	push   $0x41
  jmp __alltraps
  102226:	e9 9a fd ff ff       	jmp    101fc5 <__alltraps>

0010222b <vector66>:
.globl vector66
vector66:
  pushl $0
  10222b:	6a 00                	push   $0x0
  pushl $66
  10222d:	6a 42                	push   $0x42
  jmp __alltraps
  10222f:	e9 91 fd ff ff       	jmp    101fc5 <__alltraps>

00102234 <vector67>:
.globl vector67
vector67:
  pushl $0
  102234:	6a 00                	push   $0x0
  pushl $67
  102236:	6a 43                	push   $0x43
  jmp __alltraps
  102238:	e9 88 fd ff ff       	jmp    101fc5 <__alltraps>

0010223d <vector68>:
.globl vector68
vector68:
  pushl $0
  10223d:	6a 00                	push   $0x0
  pushl $68
  10223f:	6a 44                	push   $0x44
  jmp __alltraps
  102241:	e9 7f fd ff ff       	jmp    101fc5 <__alltraps>

00102246 <vector69>:
.globl vector69
vector69:
  pushl $0
  102246:	6a 00                	push   $0x0
  pushl $69
  102248:	6a 45                	push   $0x45
  jmp __alltraps
  10224a:	e9 76 fd ff ff       	jmp    101fc5 <__alltraps>

0010224f <vector70>:
.globl vector70
vector70:
  pushl $0
  10224f:	6a 00                	push   $0x0
  pushl $70
  102251:	6a 46                	push   $0x46
  jmp __alltraps
  102253:	e9 6d fd ff ff       	jmp    101fc5 <__alltraps>

00102258 <vector71>:
.globl vector71
vector71:
  pushl $0
  102258:	6a 00                	push   $0x0
  pushl $71
  10225a:	6a 47                	push   $0x47
  jmp __alltraps
  10225c:	e9 64 fd ff ff       	jmp    101fc5 <__alltraps>

00102261 <vector72>:
.globl vector72
vector72:
  pushl $0
  102261:	6a 00                	push   $0x0
  pushl $72
  102263:	6a 48                	push   $0x48
  jmp __alltraps
  102265:	e9 5b fd ff ff       	jmp    101fc5 <__alltraps>

0010226a <vector73>:
.globl vector73
vector73:
  pushl $0
  10226a:	6a 00                	push   $0x0
  pushl $73
  10226c:	6a 49                	push   $0x49
  jmp __alltraps
  10226e:	e9 52 fd ff ff       	jmp    101fc5 <__alltraps>

00102273 <vector74>:
.globl vector74
vector74:
  pushl $0
  102273:	6a 00                	push   $0x0
  pushl $74
  102275:	6a 4a                	push   $0x4a
  jmp __alltraps
  102277:	e9 49 fd ff ff       	jmp    101fc5 <__alltraps>

0010227c <vector75>:
.globl vector75
vector75:
  pushl $0
  10227c:	6a 00                	push   $0x0
  pushl $75
  10227e:	6a 4b                	push   $0x4b
  jmp __alltraps
  102280:	e9 40 fd ff ff       	jmp    101fc5 <__alltraps>

00102285 <vector76>:
.globl vector76
vector76:
  pushl $0
  102285:	6a 00                	push   $0x0
  pushl $76
  102287:	6a 4c                	push   $0x4c
  jmp __alltraps
  102289:	e9 37 fd ff ff       	jmp    101fc5 <__alltraps>

0010228e <vector77>:
.globl vector77
vector77:
  pushl $0
  10228e:	6a 00                	push   $0x0
  pushl $77
  102290:	6a 4d                	push   $0x4d
  jmp __alltraps
  102292:	e9 2e fd ff ff       	jmp    101fc5 <__alltraps>

00102297 <vector78>:
.globl vector78
vector78:
  pushl $0
  102297:	6a 00                	push   $0x0
  pushl $78
  102299:	6a 4e                	push   $0x4e
  jmp __alltraps
  10229b:	e9 25 fd ff ff       	jmp    101fc5 <__alltraps>

001022a0 <vector79>:
.globl vector79
vector79:
  pushl $0
  1022a0:	6a 00                	push   $0x0
  pushl $79
  1022a2:	6a 4f                	push   $0x4f
  jmp __alltraps
  1022a4:	e9 1c fd ff ff       	jmp    101fc5 <__alltraps>

001022a9 <vector80>:
.globl vector80
vector80:
  pushl $0
  1022a9:	6a 00                	push   $0x0
  pushl $80
  1022ab:	6a 50                	push   $0x50
  jmp __alltraps
  1022ad:	e9 13 fd ff ff       	jmp    101fc5 <__alltraps>

001022b2 <vector81>:
.globl vector81
vector81:
  pushl $0
  1022b2:	6a 00                	push   $0x0
  pushl $81
  1022b4:	6a 51                	push   $0x51
  jmp __alltraps
  1022b6:	e9 0a fd ff ff       	jmp    101fc5 <__alltraps>

001022bb <vector82>:
.globl vector82
vector82:
  pushl $0
  1022bb:	6a 00                	push   $0x0
  pushl $82
  1022bd:	6a 52                	push   $0x52
  jmp __alltraps
  1022bf:	e9 01 fd ff ff       	jmp    101fc5 <__alltraps>

001022c4 <vector83>:
.globl vector83
vector83:
  pushl $0
  1022c4:	6a 00                	push   $0x0
  pushl $83
  1022c6:	6a 53                	push   $0x53
  jmp __alltraps
  1022c8:	e9 f8 fc ff ff       	jmp    101fc5 <__alltraps>

001022cd <vector84>:
.globl vector84
vector84:
  pushl $0
  1022cd:	6a 00                	push   $0x0
  pushl $84
  1022cf:	6a 54                	push   $0x54
  jmp __alltraps
  1022d1:	e9 ef fc ff ff       	jmp    101fc5 <__alltraps>

001022d6 <vector85>:
.globl vector85
vector85:
  pushl $0
  1022d6:	6a 00                	push   $0x0
  pushl $85
  1022d8:	6a 55                	push   $0x55
  jmp __alltraps
  1022da:	e9 e6 fc ff ff       	jmp    101fc5 <__alltraps>

001022df <vector86>:
.globl vector86
vector86:
  pushl $0
  1022df:	6a 00                	push   $0x0
  pushl $86
  1022e1:	6a 56                	push   $0x56
  jmp __alltraps
  1022e3:	e9 dd fc ff ff       	jmp    101fc5 <__alltraps>

001022e8 <vector87>:
.globl vector87
vector87:
  pushl $0
  1022e8:	6a 00                	push   $0x0
  pushl $87
  1022ea:	6a 57                	push   $0x57
  jmp __alltraps
  1022ec:	e9 d4 fc ff ff       	jmp    101fc5 <__alltraps>

001022f1 <vector88>:
.globl vector88
vector88:
  pushl $0
  1022f1:	6a 00                	push   $0x0
  pushl $88
  1022f3:	6a 58                	push   $0x58
  jmp __alltraps
  1022f5:	e9 cb fc ff ff       	jmp    101fc5 <__alltraps>

001022fa <vector89>:
.globl vector89
vector89:
  pushl $0
  1022fa:	6a 00                	push   $0x0
  pushl $89
  1022fc:	6a 59                	push   $0x59
  jmp __alltraps
  1022fe:	e9 c2 fc ff ff       	jmp    101fc5 <__alltraps>

00102303 <vector90>:
.globl vector90
vector90:
  pushl $0
  102303:	6a 00                	push   $0x0
  pushl $90
  102305:	6a 5a                	push   $0x5a
  jmp __alltraps
  102307:	e9 b9 fc ff ff       	jmp    101fc5 <__alltraps>

0010230c <vector91>:
.globl vector91
vector91:
  pushl $0
  10230c:	6a 00                	push   $0x0
  pushl $91
  10230e:	6a 5b                	push   $0x5b
  jmp __alltraps
  102310:	e9 b0 fc ff ff       	jmp    101fc5 <__alltraps>

00102315 <vector92>:
.globl vector92
vector92:
  pushl $0
  102315:	6a 00                	push   $0x0
  pushl $92
  102317:	6a 5c                	push   $0x5c
  jmp __alltraps
  102319:	e9 a7 fc ff ff       	jmp    101fc5 <__alltraps>

0010231e <vector93>:
.globl vector93
vector93:
  pushl $0
  10231e:	6a 00                	push   $0x0
  pushl $93
  102320:	6a 5d                	push   $0x5d
  jmp __alltraps
  102322:	e9 9e fc ff ff       	jmp    101fc5 <__alltraps>

00102327 <vector94>:
.globl vector94
vector94:
  pushl $0
  102327:	6a 00                	push   $0x0
  pushl $94
  102329:	6a 5e                	push   $0x5e
  jmp __alltraps
  10232b:	e9 95 fc ff ff       	jmp    101fc5 <__alltraps>

00102330 <vector95>:
.globl vector95
vector95:
  pushl $0
  102330:	6a 00                	push   $0x0
  pushl $95
  102332:	6a 5f                	push   $0x5f
  jmp __alltraps
  102334:	e9 8c fc ff ff       	jmp    101fc5 <__alltraps>

00102339 <vector96>:
.globl vector96
vector96:
  pushl $0
  102339:	6a 00                	push   $0x0
  pushl $96
  10233b:	6a 60                	push   $0x60
  jmp __alltraps
  10233d:	e9 83 fc ff ff       	jmp    101fc5 <__alltraps>

00102342 <vector97>:
.globl vector97
vector97:
  pushl $0
  102342:	6a 00                	push   $0x0
  pushl $97
  102344:	6a 61                	push   $0x61
  jmp __alltraps
  102346:	e9 7a fc ff ff       	jmp    101fc5 <__alltraps>

0010234b <vector98>:
.globl vector98
vector98:
  pushl $0
  10234b:	6a 00                	push   $0x0
  pushl $98
  10234d:	6a 62                	push   $0x62
  jmp __alltraps
  10234f:	e9 71 fc ff ff       	jmp    101fc5 <__alltraps>

00102354 <vector99>:
.globl vector99
vector99:
  pushl $0
  102354:	6a 00                	push   $0x0
  pushl $99
  102356:	6a 63                	push   $0x63
  jmp __alltraps
  102358:	e9 68 fc ff ff       	jmp    101fc5 <__alltraps>

0010235d <vector100>:
.globl vector100
vector100:
  pushl $0
  10235d:	6a 00                	push   $0x0
  pushl $100
  10235f:	6a 64                	push   $0x64
  jmp __alltraps
  102361:	e9 5f fc ff ff       	jmp    101fc5 <__alltraps>

00102366 <vector101>:
.globl vector101
vector101:
  pushl $0
  102366:	6a 00                	push   $0x0
  pushl $101
  102368:	6a 65                	push   $0x65
  jmp __alltraps
  10236a:	e9 56 fc ff ff       	jmp    101fc5 <__alltraps>

0010236f <vector102>:
.globl vector102
vector102:
  pushl $0
  10236f:	6a 00                	push   $0x0
  pushl $102
  102371:	6a 66                	push   $0x66
  jmp __alltraps
  102373:	e9 4d fc ff ff       	jmp    101fc5 <__alltraps>

00102378 <vector103>:
.globl vector103
vector103:
  pushl $0
  102378:	6a 00                	push   $0x0
  pushl $103
  10237a:	6a 67                	push   $0x67
  jmp __alltraps
  10237c:	e9 44 fc ff ff       	jmp    101fc5 <__alltraps>

00102381 <vector104>:
.globl vector104
vector104:
  pushl $0
  102381:	6a 00                	push   $0x0
  pushl $104
  102383:	6a 68                	push   $0x68
  jmp __alltraps
  102385:	e9 3b fc ff ff       	jmp    101fc5 <__alltraps>

0010238a <vector105>:
.globl vector105
vector105:
  pushl $0
  10238a:	6a 00                	push   $0x0
  pushl $105
  10238c:	6a 69                	push   $0x69
  jmp __alltraps
  10238e:	e9 32 fc ff ff       	jmp    101fc5 <__alltraps>

00102393 <vector106>:
.globl vector106
vector106:
  pushl $0
  102393:	6a 00                	push   $0x0
  pushl $106
  102395:	6a 6a                	push   $0x6a
  jmp __alltraps
  102397:	e9 29 fc ff ff       	jmp    101fc5 <__alltraps>

0010239c <vector107>:
.globl vector107
vector107:
  pushl $0
  10239c:	6a 00                	push   $0x0
  pushl $107
  10239e:	6a 6b                	push   $0x6b
  jmp __alltraps
  1023a0:	e9 20 fc ff ff       	jmp    101fc5 <__alltraps>

001023a5 <vector108>:
.globl vector108
vector108:
  pushl $0
  1023a5:	6a 00                	push   $0x0
  pushl $108
  1023a7:	6a 6c                	push   $0x6c
  jmp __alltraps
  1023a9:	e9 17 fc ff ff       	jmp    101fc5 <__alltraps>

001023ae <vector109>:
.globl vector109
vector109:
  pushl $0
  1023ae:	6a 00                	push   $0x0
  pushl $109
  1023b0:	6a 6d                	push   $0x6d
  jmp __alltraps
  1023b2:	e9 0e fc ff ff       	jmp    101fc5 <__alltraps>

001023b7 <vector110>:
.globl vector110
vector110:
  pushl $0
  1023b7:	6a 00                	push   $0x0
  pushl $110
  1023b9:	6a 6e                	push   $0x6e
  jmp __alltraps
  1023bb:	e9 05 fc ff ff       	jmp    101fc5 <__alltraps>

001023c0 <vector111>:
.globl vector111
vector111:
  pushl $0
  1023c0:	6a 00                	push   $0x0
  pushl $111
  1023c2:	6a 6f                	push   $0x6f
  jmp __alltraps
  1023c4:	e9 fc fb ff ff       	jmp    101fc5 <__alltraps>

001023c9 <vector112>:
.globl vector112
vector112:
  pushl $0
  1023c9:	6a 00                	push   $0x0
  pushl $112
  1023cb:	6a 70                	push   $0x70
  jmp __alltraps
  1023cd:	e9 f3 fb ff ff       	jmp    101fc5 <__alltraps>

001023d2 <vector113>:
.globl vector113
vector113:
  pushl $0
  1023d2:	6a 00                	push   $0x0
  pushl $113
  1023d4:	6a 71                	push   $0x71
  jmp __alltraps
  1023d6:	e9 ea fb ff ff       	jmp    101fc5 <__alltraps>

001023db <vector114>:
.globl vector114
vector114:
  pushl $0
  1023db:	6a 00                	push   $0x0
  pushl $114
  1023dd:	6a 72                	push   $0x72
  jmp __alltraps
  1023df:	e9 e1 fb ff ff       	jmp    101fc5 <__alltraps>

001023e4 <vector115>:
.globl vector115
vector115:
  pushl $0
  1023e4:	6a 00                	push   $0x0
  pushl $115
  1023e6:	6a 73                	push   $0x73
  jmp __alltraps
  1023e8:	e9 d8 fb ff ff       	jmp    101fc5 <__alltraps>

001023ed <vector116>:
.globl vector116
vector116:
  pushl $0
  1023ed:	6a 00                	push   $0x0
  pushl $116
  1023ef:	6a 74                	push   $0x74
  jmp __alltraps
  1023f1:	e9 cf fb ff ff       	jmp    101fc5 <__alltraps>

001023f6 <vector117>:
.globl vector117
vector117:
  pushl $0
  1023f6:	6a 00                	push   $0x0
  pushl $117
  1023f8:	6a 75                	push   $0x75
  jmp __alltraps
  1023fa:	e9 c6 fb ff ff       	jmp    101fc5 <__alltraps>

001023ff <vector118>:
.globl vector118
vector118:
  pushl $0
  1023ff:	6a 00                	push   $0x0
  pushl $118
  102401:	6a 76                	push   $0x76
  jmp __alltraps
  102403:	e9 bd fb ff ff       	jmp    101fc5 <__alltraps>

00102408 <vector119>:
.globl vector119
vector119:
  pushl $0
  102408:	6a 00                	push   $0x0
  pushl $119
  10240a:	6a 77                	push   $0x77
  jmp __alltraps
  10240c:	e9 b4 fb ff ff       	jmp    101fc5 <__alltraps>

00102411 <vector120>:
.globl vector120
vector120:
  pushl $0
  102411:	6a 00                	push   $0x0
  pushl $120
  102413:	6a 78                	push   $0x78
  jmp __alltraps
  102415:	e9 ab fb ff ff       	jmp    101fc5 <__alltraps>

0010241a <vector121>:
.globl vector121
vector121:
  pushl $0
  10241a:	6a 00                	push   $0x0
  pushl $121
  10241c:	6a 79                	push   $0x79
  jmp __alltraps
  10241e:	e9 a2 fb ff ff       	jmp    101fc5 <__alltraps>

00102423 <vector122>:
.globl vector122
vector122:
  pushl $0
  102423:	6a 00                	push   $0x0
  pushl $122
  102425:	6a 7a                	push   $0x7a
  jmp __alltraps
  102427:	e9 99 fb ff ff       	jmp    101fc5 <__alltraps>

0010242c <vector123>:
.globl vector123
vector123:
  pushl $0
  10242c:	6a 00                	push   $0x0
  pushl $123
  10242e:	6a 7b                	push   $0x7b
  jmp __alltraps
  102430:	e9 90 fb ff ff       	jmp    101fc5 <__alltraps>

00102435 <vector124>:
.globl vector124
vector124:
  pushl $0
  102435:	6a 00                	push   $0x0
  pushl $124
  102437:	6a 7c                	push   $0x7c
  jmp __alltraps
  102439:	e9 87 fb ff ff       	jmp    101fc5 <__alltraps>

0010243e <vector125>:
.globl vector125
vector125:
  pushl $0
  10243e:	6a 00                	push   $0x0
  pushl $125
  102440:	6a 7d                	push   $0x7d
  jmp __alltraps
  102442:	e9 7e fb ff ff       	jmp    101fc5 <__alltraps>

00102447 <vector126>:
.globl vector126
vector126:
  pushl $0
  102447:	6a 00                	push   $0x0
  pushl $126
  102449:	6a 7e                	push   $0x7e
  jmp __alltraps
  10244b:	e9 75 fb ff ff       	jmp    101fc5 <__alltraps>

00102450 <vector127>:
.globl vector127
vector127:
  pushl $0
  102450:	6a 00                	push   $0x0
  pushl $127
  102452:	6a 7f                	push   $0x7f
  jmp __alltraps
  102454:	e9 6c fb ff ff       	jmp    101fc5 <__alltraps>

00102459 <vector128>:
.globl vector128
vector128:
  pushl $0
  102459:	6a 00                	push   $0x0
  pushl $128
  10245b:	68 80 00 00 00       	push   $0x80
  jmp __alltraps
  102460:	e9 60 fb ff ff       	jmp    101fc5 <__alltraps>

00102465 <vector129>:
.globl vector129
vector129:
  pushl $0
  102465:	6a 00                	push   $0x0
  pushl $129
  102467:	68 81 00 00 00       	push   $0x81
  jmp __alltraps
  10246c:	e9 54 fb ff ff       	jmp    101fc5 <__alltraps>

00102471 <vector130>:
.globl vector130
vector130:
  pushl $0
  102471:	6a 00                	push   $0x0
  pushl $130
  102473:	68 82 00 00 00       	push   $0x82
  jmp __alltraps
  102478:	e9 48 fb ff ff       	jmp    101fc5 <__alltraps>

0010247d <vector131>:
.globl vector131
vector131:
  pushl $0
  10247d:	6a 00                	push   $0x0
  pushl $131
  10247f:	68 83 00 00 00       	push   $0x83
  jmp __alltraps
  102484:	e9 3c fb ff ff       	jmp    101fc5 <__alltraps>

00102489 <vector132>:
.globl vector132
vector132:
  pushl $0
  102489:	6a 00                	push   $0x0
  pushl $132
  10248b:	68 84 00 00 00       	push   $0x84
  jmp __alltraps
  102490:	e9 30 fb ff ff       	jmp    101fc5 <__alltraps>

00102495 <vector133>:
.globl vector133
vector133:
  pushl $0
  102495:	6a 00                	push   $0x0
  pushl $133
  102497:	68 85 00 00 00       	push   $0x85
  jmp __alltraps
  10249c:	e9 24 fb ff ff       	jmp    101fc5 <__alltraps>

001024a1 <vector134>:
.globl vector134
vector134:
  pushl $0
  1024a1:	6a 00                	push   $0x0
  pushl $134
  1024a3:	68 86 00 00 00       	push   $0x86
  jmp __alltraps
  1024a8:	e9 18 fb ff ff       	jmp    101fc5 <__alltraps>

001024ad <vector135>:
.globl vector135
vector135:
  pushl $0
  1024ad:	6a 00                	push   $0x0
  pushl $135
  1024af:	68 87 00 00 00       	push   $0x87
  jmp __alltraps
  1024b4:	e9 0c fb ff ff       	jmp    101fc5 <__alltraps>

001024b9 <vector136>:
.globl vector136
vector136:
  pushl $0
  1024b9:	6a 00                	push   $0x0
  pushl $136
  1024bb:	68 88 00 00 00       	push   $0x88
  jmp __alltraps
  1024c0:	e9 00 fb ff ff       	jmp    101fc5 <__alltraps>

001024c5 <vector137>:
.globl vector137
vector137:
  pushl $0
  1024c5:	6a 00                	push   $0x0
  pushl $137
  1024c7:	68 89 00 00 00       	push   $0x89
  jmp __alltraps
  1024cc:	e9 f4 fa ff ff       	jmp    101fc5 <__alltraps>

001024d1 <vector138>:
.globl vector138
vector138:
  pushl $0
  1024d1:	6a 00                	push   $0x0
  pushl $138
  1024d3:	68 8a 00 00 00       	push   $0x8a
  jmp __alltraps
  1024d8:	e9 e8 fa ff ff       	jmp    101fc5 <__alltraps>

001024dd <vector139>:
.globl vector139
vector139:
  pushl $0
  1024dd:	6a 00                	push   $0x0
  pushl $139
  1024df:	68 8b 00 00 00       	push   $0x8b
  jmp __alltraps
  1024e4:	e9 dc fa ff ff       	jmp    101fc5 <__alltraps>

001024e9 <vector140>:
.globl vector140
vector140:
  pushl $0
  1024e9:	6a 00                	push   $0x0
  pushl $140
  1024eb:	68 8c 00 00 00       	push   $0x8c
  jmp __alltraps
  1024f0:	e9 d0 fa ff ff       	jmp    101fc5 <__alltraps>

001024f5 <vector141>:
.globl vector141
vector141:
  pushl $0
  1024f5:	6a 00                	push   $0x0
  pushl $141
  1024f7:	68 8d 00 00 00       	push   $0x8d
  jmp __alltraps
  1024fc:	e9 c4 fa ff ff       	jmp    101fc5 <__alltraps>

00102501 <vector142>:
.globl vector142
vector142:
  pushl $0
  102501:	6a 00                	push   $0x0
  pushl $142
  102503:	68 8e 00 00 00       	push   $0x8e
  jmp __alltraps
  102508:	e9 b8 fa ff ff       	jmp    101fc5 <__alltraps>

0010250d <vector143>:
.globl vector143
vector143:
  pushl $0
  10250d:	6a 00                	push   $0x0
  pushl $143
  10250f:	68 8f 00 00 00       	push   $0x8f
  jmp __alltraps
  102514:	e9 ac fa ff ff       	jmp    101fc5 <__alltraps>

00102519 <vector144>:
.globl vector144
vector144:
  pushl $0
  102519:	6a 00                	push   $0x0
  pushl $144
  10251b:	68 90 00 00 00       	push   $0x90
  jmp __alltraps
  102520:	e9 a0 fa ff ff       	jmp    101fc5 <__alltraps>

00102525 <vector145>:
.globl vector145
vector145:
  pushl $0
  102525:	6a 00                	push   $0x0
  pushl $145
  102527:	68 91 00 00 00       	push   $0x91
  jmp __alltraps
  10252c:	e9 94 fa ff ff       	jmp    101fc5 <__alltraps>

00102531 <vector146>:
.globl vector146
vector146:
  pushl $0
  102531:	6a 00                	push   $0x0
  pushl $146
  102533:	68 92 00 00 00       	push   $0x92
  jmp __alltraps
  102538:	e9 88 fa ff ff       	jmp    101fc5 <__alltraps>

0010253d <vector147>:
.globl vector147
vector147:
  pushl $0
  10253d:	6a 00                	push   $0x0
  pushl $147
  10253f:	68 93 00 00 00       	push   $0x93
  jmp __alltraps
  102544:	e9 7c fa ff ff       	jmp    101fc5 <__alltraps>

00102549 <vector148>:
.globl vector148
vector148:
  pushl $0
  102549:	6a 00                	push   $0x0
  pushl $148
  10254b:	68 94 00 00 00       	push   $0x94
  jmp __alltraps
  102550:	e9 70 fa ff ff       	jmp    101fc5 <__alltraps>

00102555 <vector149>:
.globl vector149
vector149:
  pushl $0
  102555:	6a 00                	push   $0x0
  pushl $149
  102557:	68 95 00 00 00       	push   $0x95
  jmp __alltraps
  10255c:	e9 64 fa ff ff       	jmp    101fc5 <__alltraps>

00102561 <vector150>:
.globl vector150
vector150:
  pushl $0
  102561:	6a 00                	push   $0x0
  pushl $150
  102563:	68 96 00 00 00       	push   $0x96
  jmp __alltraps
  102568:	e9 58 fa ff ff       	jmp    101fc5 <__alltraps>

0010256d <vector151>:
.globl vector151
vector151:
  pushl $0
  10256d:	6a 00                	push   $0x0
  pushl $151
  10256f:	68 97 00 00 00       	push   $0x97
  jmp __alltraps
  102574:	e9 4c fa ff ff       	jmp    101fc5 <__alltraps>

00102579 <vector152>:
.globl vector152
vector152:
  pushl $0
  102579:	6a 00                	push   $0x0
  pushl $152
  10257b:	68 98 00 00 00       	push   $0x98
  jmp __alltraps
  102580:	e9 40 fa ff ff       	jmp    101fc5 <__alltraps>

00102585 <vector153>:
.globl vector153
vector153:
  pushl $0
  102585:	6a 00                	push   $0x0
  pushl $153
  102587:	68 99 00 00 00       	push   $0x99
  jmp __alltraps
  10258c:	e9 34 fa ff ff       	jmp    101fc5 <__alltraps>

00102591 <vector154>:
.globl vector154
vector154:
  pushl $0
  102591:	6a 00                	push   $0x0
  pushl $154
  102593:	68 9a 00 00 00       	push   $0x9a
  jmp __alltraps
  102598:	e9 28 fa ff ff       	jmp    101fc5 <__alltraps>

0010259d <vector155>:
.globl vector155
vector155:
  pushl $0
  10259d:	6a 00                	push   $0x0
  pushl $155
  10259f:	68 9b 00 00 00       	push   $0x9b
  jmp __alltraps
  1025a4:	e9 1c fa ff ff       	jmp    101fc5 <__alltraps>

001025a9 <vector156>:
.globl vector156
vector156:
  pushl $0
  1025a9:	6a 00                	push   $0x0
  pushl $156
  1025ab:	68 9c 00 00 00       	push   $0x9c
  jmp __alltraps
  1025b0:	e9 10 fa ff ff       	jmp    101fc5 <__alltraps>

001025b5 <vector157>:
.globl vector157
vector157:
  pushl $0
  1025b5:	6a 00                	push   $0x0
  pushl $157
  1025b7:	68 9d 00 00 00       	push   $0x9d
  jmp __alltraps
  1025bc:	e9 04 fa ff ff       	jmp    101fc5 <__alltraps>

001025c1 <vector158>:
.globl vector158
vector158:
  pushl $0
  1025c1:	6a 00                	push   $0x0
  pushl $158
  1025c3:	68 9e 00 00 00       	push   $0x9e
  jmp __alltraps
  1025c8:	e9 f8 f9 ff ff       	jmp    101fc5 <__alltraps>

001025cd <vector159>:
.globl vector159
vector159:
  pushl $0
  1025cd:	6a 00                	push   $0x0
  pushl $159
  1025cf:	68 9f 00 00 00       	push   $0x9f
  jmp __alltraps
  1025d4:	e9 ec f9 ff ff       	jmp    101fc5 <__alltraps>

001025d9 <vector160>:
.globl vector160
vector160:
  pushl $0
  1025d9:	6a 00                	push   $0x0
  pushl $160
  1025db:	68 a0 00 00 00       	push   $0xa0
  jmp __alltraps
  1025e0:	e9 e0 f9 ff ff       	jmp    101fc5 <__alltraps>

001025e5 <vector161>:
.globl vector161
vector161:
  pushl $0
  1025e5:	6a 00                	push   $0x0
  pushl $161
  1025e7:	68 a1 00 00 00       	push   $0xa1
  jmp __alltraps
  1025ec:	e9 d4 f9 ff ff       	jmp    101fc5 <__alltraps>

001025f1 <vector162>:
.globl vector162
vector162:
  pushl $0
  1025f1:	6a 00                	push   $0x0
  pushl $162
  1025f3:	68 a2 00 00 00       	push   $0xa2
  jmp __alltraps
  1025f8:	e9 c8 f9 ff ff       	jmp    101fc5 <__alltraps>

001025fd <vector163>:
.globl vector163
vector163:
  pushl $0
  1025fd:	6a 00                	push   $0x0
  pushl $163
  1025ff:	68 a3 00 00 00       	push   $0xa3
  jmp __alltraps
  102604:	e9 bc f9 ff ff       	jmp    101fc5 <__alltraps>

00102609 <vector164>:
.globl vector164
vector164:
  pushl $0
  102609:	6a 00                	push   $0x0
  pushl $164
  10260b:	68 a4 00 00 00       	push   $0xa4
  jmp __alltraps
  102610:	e9 b0 f9 ff ff       	jmp    101fc5 <__alltraps>

00102615 <vector165>:
.globl vector165
vector165:
  pushl $0
  102615:	6a 00                	push   $0x0
  pushl $165
  102617:	68 a5 00 00 00       	push   $0xa5
  jmp __alltraps
  10261c:	e9 a4 f9 ff ff       	jmp    101fc5 <__alltraps>

00102621 <vector166>:
.globl vector166
vector166:
  pushl $0
  102621:	6a 00                	push   $0x0
  pushl $166
  102623:	68 a6 00 00 00       	push   $0xa6
  jmp __alltraps
  102628:	e9 98 f9 ff ff       	jmp    101fc5 <__alltraps>

0010262d <vector167>:
.globl vector167
vector167:
  pushl $0
  10262d:	6a 00                	push   $0x0
  pushl $167
  10262f:	68 a7 00 00 00       	push   $0xa7
  jmp __alltraps
  102634:	e9 8c f9 ff ff       	jmp    101fc5 <__alltraps>

00102639 <vector168>:
.globl vector168
vector168:
  pushl $0
  102639:	6a 00                	push   $0x0
  pushl $168
  10263b:	68 a8 00 00 00       	push   $0xa8
  jmp __alltraps
  102640:	e9 80 f9 ff ff       	jmp    101fc5 <__alltraps>

00102645 <vector169>:
.globl vector169
vector169:
  pushl $0
  102645:	6a 00                	push   $0x0
  pushl $169
  102647:	68 a9 00 00 00       	push   $0xa9
  jmp __alltraps
  10264c:	e9 74 f9 ff ff       	jmp    101fc5 <__alltraps>

00102651 <vector170>:
.globl vector170
vector170:
  pushl $0
  102651:	6a 00                	push   $0x0
  pushl $170
  102653:	68 aa 00 00 00       	push   $0xaa
  jmp __alltraps
  102658:	e9 68 f9 ff ff       	jmp    101fc5 <__alltraps>

0010265d <vector171>:
.globl vector171
vector171:
  pushl $0
  10265d:	6a 00                	push   $0x0
  pushl $171
  10265f:	68 ab 00 00 00       	push   $0xab
  jmp __alltraps
  102664:	e9 5c f9 ff ff       	jmp    101fc5 <__alltraps>

00102669 <vector172>:
.globl vector172
vector172:
  pushl $0
  102669:	6a 00                	push   $0x0
  pushl $172
  10266b:	68 ac 00 00 00       	push   $0xac
  jmp __alltraps
  102670:	e9 50 f9 ff ff       	jmp    101fc5 <__alltraps>

00102675 <vector173>:
.globl vector173
vector173:
  pushl $0
  102675:	6a 00                	push   $0x0
  pushl $173
  102677:	68 ad 00 00 00       	push   $0xad
  jmp __alltraps
  10267c:	e9 44 f9 ff ff       	jmp    101fc5 <__alltraps>

00102681 <vector174>:
.globl vector174
vector174:
  pushl $0
  102681:	6a 00                	push   $0x0
  pushl $174
  102683:	68 ae 00 00 00       	push   $0xae
  jmp __alltraps
  102688:	e9 38 f9 ff ff       	jmp    101fc5 <__alltraps>

0010268d <vector175>:
.globl vector175
vector175:
  pushl $0
  10268d:	6a 00                	push   $0x0
  pushl $175
  10268f:	68 af 00 00 00       	push   $0xaf
  jmp __alltraps
  102694:	e9 2c f9 ff ff       	jmp    101fc5 <__alltraps>

00102699 <vector176>:
.globl vector176
vector176:
  pushl $0
  102699:	6a 00                	push   $0x0
  pushl $176
  10269b:	68 b0 00 00 00       	push   $0xb0
  jmp __alltraps
  1026a0:	e9 20 f9 ff ff       	jmp    101fc5 <__alltraps>

001026a5 <vector177>:
.globl vector177
vector177:
  pushl $0
  1026a5:	6a 00                	push   $0x0
  pushl $177
  1026a7:	68 b1 00 00 00       	push   $0xb1
  jmp __alltraps
  1026ac:	e9 14 f9 ff ff       	jmp    101fc5 <__alltraps>

001026b1 <vector178>:
.globl vector178
vector178:
  pushl $0
  1026b1:	6a 00                	push   $0x0
  pushl $178
  1026b3:	68 b2 00 00 00       	push   $0xb2
  jmp __alltraps
  1026b8:	e9 08 f9 ff ff       	jmp    101fc5 <__alltraps>

001026bd <vector179>:
.globl vector179
vector179:
  pushl $0
  1026bd:	6a 00                	push   $0x0
  pushl $179
  1026bf:	68 b3 00 00 00       	push   $0xb3
  jmp __alltraps
  1026c4:	e9 fc f8 ff ff       	jmp    101fc5 <__alltraps>

001026c9 <vector180>:
.globl vector180
vector180:
  pushl $0
  1026c9:	6a 00                	push   $0x0
  pushl $180
  1026cb:	68 b4 00 00 00       	push   $0xb4
  jmp __alltraps
  1026d0:	e9 f0 f8 ff ff       	jmp    101fc5 <__alltraps>

001026d5 <vector181>:
.globl vector181
vector181:
  pushl $0
  1026d5:	6a 00                	push   $0x0
  pushl $181
  1026d7:	68 b5 00 00 00       	push   $0xb5
  jmp __alltraps
  1026dc:	e9 e4 f8 ff ff       	jmp    101fc5 <__alltraps>

001026e1 <vector182>:
.globl vector182
vector182:
  pushl $0
  1026e1:	6a 00                	push   $0x0
  pushl $182
  1026e3:	68 b6 00 00 00       	push   $0xb6
  jmp __alltraps
  1026e8:	e9 d8 f8 ff ff       	jmp    101fc5 <__alltraps>

001026ed <vector183>:
.globl vector183
vector183:
  pushl $0
  1026ed:	6a 00                	push   $0x0
  pushl $183
  1026ef:	68 b7 00 00 00       	push   $0xb7
  jmp __alltraps
  1026f4:	e9 cc f8 ff ff       	jmp    101fc5 <__alltraps>

001026f9 <vector184>:
.globl vector184
vector184:
  pushl $0
  1026f9:	6a 00                	push   $0x0
  pushl $184
  1026fb:	68 b8 00 00 00       	push   $0xb8
  jmp __alltraps
  102700:	e9 c0 f8 ff ff       	jmp    101fc5 <__alltraps>

00102705 <vector185>:
.globl vector185
vector185:
  pushl $0
  102705:	6a 00                	push   $0x0
  pushl $185
  102707:	68 b9 00 00 00       	push   $0xb9
  jmp __alltraps
  10270c:	e9 b4 f8 ff ff       	jmp    101fc5 <__alltraps>

00102711 <vector186>:
.globl vector186
vector186:
  pushl $0
  102711:	6a 00                	push   $0x0
  pushl $186
  102713:	68 ba 00 00 00       	push   $0xba
  jmp __alltraps
  102718:	e9 a8 f8 ff ff       	jmp    101fc5 <__alltraps>

0010271d <vector187>:
.globl vector187
vector187:
  pushl $0
  10271d:	6a 00                	push   $0x0
  pushl $187
  10271f:	68 bb 00 00 00       	push   $0xbb
  jmp __alltraps
  102724:	e9 9c f8 ff ff       	jmp    101fc5 <__alltraps>

00102729 <vector188>:
.globl vector188
vector188:
  pushl $0
  102729:	6a 00                	push   $0x0
  pushl $188
  10272b:	68 bc 00 00 00       	push   $0xbc
  jmp __alltraps
  102730:	e9 90 f8 ff ff       	jmp    101fc5 <__alltraps>

00102735 <vector189>:
.globl vector189
vector189:
  pushl $0
  102735:	6a 00                	push   $0x0
  pushl $189
  102737:	68 bd 00 00 00       	push   $0xbd
  jmp __alltraps
  10273c:	e9 84 f8 ff ff       	jmp    101fc5 <__alltraps>

00102741 <vector190>:
.globl vector190
vector190:
  pushl $0
  102741:	6a 00                	push   $0x0
  pushl $190
  102743:	68 be 00 00 00       	push   $0xbe
  jmp __alltraps
  102748:	e9 78 f8 ff ff       	jmp    101fc5 <__alltraps>

0010274d <vector191>:
.globl vector191
vector191:
  pushl $0
  10274d:	6a 00                	push   $0x0
  pushl $191
  10274f:	68 bf 00 00 00       	push   $0xbf
  jmp __alltraps
  102754:	e9 6c f8 ff ff       	jmp    101fc5 <__alltraps>

00102759 <vector192>:
.globl vector192
vector192:
  pushl $0
  102759:	6a 00                	push   $0x0
  pushl $192
  10275b:	68 c0 00 00 00       	push   $0xc0
  jmp __alltraps
  102760:	e9 60 f8 ff ff       	jmp    101fc5 <__alltraps>

00102765 <vector193>:
.globl vector193
vector193:
  pushl $0
  102765:	6a 00                	push   $0x0
  pushl $193
  102767:	68 c1 00 00 00       	push   $0xc1
  jmp __alltraps
  10276c:	e9 54 f8 ff ff       	jmp    101fc5 <__alltraps>

00102771 <vector194>:
.globl vector194
vector194:
  pushl $0
  102771:	6a 00                	push   $0x0
  pushl $194
  102773:	68 c2 00 00 00       	push   $0xc2
  jmp __alltraps
  102778:	e9 48 f8 ff ff       	jmp    101fc5 <__alltraps>

0010277d <vector195>:
.globl vector195
vector195:
  pushl $0
  10277d:	6a 00                	push   $0x0
  pushl $195
  10277f:	68 c3 00 00 00       	push   $0xc3
  jmp __alltraps
  102784:	e9 3c f8 ff ff       	jmp    101fc5 <__alltraps>

00102789 <vector196>:
.globl vector196
vector196:
  pushl $0
  102789:	6a 00                	push   $0x0
  pushl $196
  10278b:	68 c4 00 00 00       	push   $0xc4
  jmp __alltraps
  102790:	e9 30 f8 ff ff       	jmp    101fc5 <__alltraps>

00102795 <vector197>:
.globl vector197
vector197:
  pushl $0
  102795:	6a 00                	push   $0x0
  pushl $197
  102797:	68 c5 00 00 00       	push   $0xc5
  jmp __alltraps
  10279c:	e9 24 f8 ff ff       	jmp    101fc5 <__alltraps>

001027a1 <vector198>:
.globl vector198
vector198:
  pushl $0
  1027a1:	6a 00                	push   $0x0
  pushl $198
  1027a3:	68 c6 00 00 00       	push   $0xc6
  jmp __alltraps
  1027a8:	e9 18 f8 ff ff       	jmp    101fc5 <__alltraps>

001027ad <vector199>:
.globl vector199
vector199:
  pushl $0
  1027ad:	6a 00                	push   $0x0
  pushl $199
  1027af:	68 c7 00 00 00       	push   $0xc7
  jmp __alltraps
  1027b4:	e9 0c f8 ff ff       	jmp    101fc5 <__alltraps>

001027b9 <vector200>:
.globl vector200
vector200:
  pushl $0
  1027b9:	6a 00                	push   $0x0
  pushl $200
  1027bb:	68 c8 00 00 00       	push   $0xc8
  jmp __alltraps
  1027c0:	e9 00 f8 ff ff       	jmp    101fc5 <__alltraps>

001027c5 <vector201>:
.globl vector201
vector201:
  pushl $0
  1027c5:	6a 00                	push   $0x0
  pushl $201
  1027c7:	68 c9 00 00 00       	push   $0xc9
  jmp __alltraps
  1027cc:	e9 f4 f7 ff ff       	jmp    101fc5 <__alltraps>

001027d1 <vector202>:
.globl vector202
vector202:
  pushl $0
  1027d1:	6a 00                	push   $0x0
  pushl $202
  1027d3:	68 ca 00 00 00       	push   $0xca
  jmp __alltraps
  1027d8:	e9 e8 f7 ff ff       	jmp    101fc5 <__alltraps>

001027dd <vector203>:
.globl vector203
vector203:
  pushl $0
  1027dd:	6a 00                	push   $0x0
  pushl $203
  1027df:	68 cb 00 00 00       	push   $0xcb
  jmp __alltraps
  1027e4:	e9 dc f7 ff ff       	jmp    101fc5 <__alltraps>

001027e9 <vector204>:
.globl vector204
vector204:
  pushl $0
  1027e9:	6a 00                	push   $0x0
  pushl $204
  1027eb:	68 cc 00 00 00       	push   $0xcc
  jmp __alltraps
  1027f0:	e9 d0 f7 ff ff       	jmp    101fc5 <__alltraps>

001027f5 <vector205>:
.globl vector205
vector205:
  pushl $0
  1027f5:	6a 00                	push   $0x0
  pushl $205
  1027f7:	68 cd 00 00 00       	push   $0xcd
  jmp __alltraps
  1027fc:	e9 c4 f7 ff ff       	jmp    101fc5 <__alltraps>

00102801 <vector206>:
.globl vector206
vector206:
  pushl $0
  102801:	6a 00                	push   $0x0
  pushl $206
  102803:	68 ce 00 00 00       	push   $0xce
  jmp __alltraps
  102808:	e9 b8 f7 ff ff       	jmp    101fc5 <__alltraps>

0010280d <vector207>:
.globl vector207
vector207:
  pushl $0
  10280d:	6a 00                	push   $0x0
  pushl $207
  10280f:	68 cf 00 00 00       	push   $0xcf
  jmp __alltraps
  102814:	e9 ac f7 ff ff       	jmp    101fc5 <__alltraps>

00102819 <vector208>:
.globl vector208
vector208:
  pushl $0
  102819:	6a 00                	push   $0x0
  pushl $208
  10281b:	68 d0 00 00 00       	push   $0xd0
  jmp __alltraps
  102820:	e9 a0 f7 ff ff       	jmp    101fc5 <__alltraps>

00102825 <vector209>:
.globl vector209
vector209:
  pushl $0
  102825:	6a 00                	push   $0x0
  pushl $209
  102827:	68 d1 00 00 00       	push   $0xd1
  jmp __alltraps
  10282c:	e9 94 f7 ff ff       	jmp    101fc5 <__alltraps>

00102831 <vector210>:
.globl vector210
vector210:
  pushl $0
  102831:	6a 00                	push   $0x0
  pushl $210
  102833:	68 d2 00 00 00       	push   $0xd2
  jmp __alltraps
  102838:	e9 88 f7 ff ff       	jmp    101fc5 <__alltraps>

0010283d <vector211>:
.globl vector211
vector211:
  pushl $0
  10283d:	6a 00                	push   $0x0
  pushl $211
  10283f:	68 d3 00 00 00       	push   $0xd3
  jmp __alltraps
  102844:	e9 7c f7 ff ff       	jmp    101fc5 <__alltraps>

00102849 <vector212>:
.globl vector212
vector212:
  pushl $0
  102849:	6a 00                	push   $0x0
  pushl $212
  10284b:	68 d4 00 00 00       	push   $0xd4
  jmp __alltraps
  102850:	e9 70 f7 ff ff       	jmp    101fc5 <__alltraps>

00102855 <vector213>:
.globl vector213
vector213:
  pushl $0
  102855:	6a 00                	push   $0x0
  pushl $213
  102857:	68 d5 00 00 00       	push   $0xd5
  jmp __alltraps
  10285c:	e9 64 f7 ff ff       	jmp    101fc5 <__alltraps>

00102861 <vector214>:
.globl vector214
vector214:
  pushl $0
  102861:	6a 00                	push   $0x0
  pushl $214
  102863:	68 d6 00 00 00       	push   $0xd6
  jmp __alltraps
  102868:	e9 58 f7 ff ff       	jmp    101fc5 <__alltraps>

0010286d <vector215>:
.globl vector215
vector215:
  pushl $0
  10286d:	6a 00                	push   $0x0
  pushl $215
  10286f:	68 d7 00 00 00       	push   $0xd7
  jmp __alltraps
  102874:	e9 4c f7 ff ff       	jmp    101fc5 <__alltraps>

00102879 <vector216>:
.globl vector216
vector216:
  pushl $0
  102879:	6a 00                	push   $0x0
  pushl $216
  10287b:	68 d8 00 00 00       	push   $0xd8
  jmp __alltraps
  102880:	e9 40 f7 ff ff       	jmp    101fc5 <__alltraps>

00102885 <vector217>:
.globl vector217
vector217:
  pushl $0
  102885:	6a 00                	push   $0x0
  pushl $217
  102887:	68 d9 00 00 00       	push   $0xd9
  jmp __alltraps
  10288c:	e9 34 f7 ff ff       	jmp    101fc5 <__alltraps>

00102891 <vector218>:
.globl vector218
vector218:
  pushl $0
  102891:	6a 00                	push   $0x0
  pushl $218
  102893:	68 da 00 00 00       	push   $0xda
  jmp __alltraps
  102898:	e9 28 f7 ff ff       	jmp    101fc5 <__alltraps>

0010289d <vector219>:
.globl vector219
vector219:
  pushl $0
  10289d:	6a 00                	push   $0x0
  pushl $219
  10289f:	68 db 00 00 00       	push   $0xdb
  jmp __alltraps
  1028a4:	e9 1c f7 ff ff       	jmp    101fc5 <__alltraps>

001028a9 <vector220>:
.globl vector220
vector220:
  pushl $0
  1028a9:	6a 00                	push   $0x0
  pushl $220
  1028ab:	68 dc 00 00 00       	push   $0xdc
  jmp __alltraps
  1028b0:	e9 10 f7 ff ff       	jmp    101fc5 <__alltraps>

001028b5 <vector221>:
.globl vector221
vector221:
  pushl $0
  1028b5:	6a 00                	push   $0x0
  pushl $221
  1028b7:	68 dd 00 00 00       	push   $0xdd
  jmp __alltraps
  1028bc:	e9 04 f7 ff ff       	jmp    101fc5 <__alltraps>

001028c1 <vector222>:
.globl vector222
vector222:
  pushl $0
  1028c1:	6a 00                	push   $0x0
  pushl $222
  1028c3:	68 de 00 00 00       	push   $0xde
  jmp __alltraps
  1028c8:	e9 f8 f6 ff ff       	jmp    101fc5 <__alltraps>

001028cd <vector223>:
.globl vector223
vector223:
  pushl $0
  1028cd:	6a 00                	push   $0x0
  pushl $223
  1028cf:	68 df 00 00 00       	push   $0xdf
  jmp __alltraps
  1028d4:	e9 ec f6 ff ff       	jmp    101fc5 <__alltraps>

001028d9 <vector224>:
.globl vector224
vector224:
  pushl $0
  1028d9:	6a 00                	push   $0x0
  pushl $224
  1028db:	68 e0 00 00 00       	push   $0xe0
  jmp __alltraps
  1028e0:	e9 e0 f6 ff ff       	jmp    101fc5 <__alltraps>

001028e5 <vector225>:
.globl vector225
vector225:
  pushl $0
  1028e5:	6a 00                	push   $0x0
  pushl $225
  1028e7:	68 e1 00 00 00       	push   $0xe1
  jmp __alltraps
  1028ec:	e9 d4 f6 ff ff       	jmp    101fc5 <__alltraps>

001028f1 <vector226>:
.globl vector226
vector226:
  pushl $0
  1028f1:	6a 00                	push   $0x0
  pushl $226
  1028f3:	68 e2 00 00 00       	push   $0xe2
  jmp __alltraps
  1028f8:	e9 c8 f6 ff ff       	jmp    101fc5 <__alltraps>

001028fd <vector227>:
.globl vector227
vector227:
  pushl $0
  1028fd:	6a 00                	push   $0x0
  pushl $227
  1028ff:	68 e3 00 00 00       	push   $0xe3
  jmp __alltraps
  102904:	e9 bc f6 ff ff       	jmp    101fc5 <__alltraps>

00102909 <vector228>:
.globl vector228
vector228:
  pushl $0
  102909:	6a 00                	push   $0x0
  pushl $228
  10290b:	68 e4 00 00 00       	push   $0xe4
  jmp __alltraps
  102910:	e9 b0 f6 ff ff       	jmp    101fc5 <__alltraps>

00102915 <vector229>:
.globl vector229
vector229:
  pushl $0
  102915:	6a 00                	push   $0x0
  pushl $229
  102917:	68 e5 00 00 00       	push   $0xe5
  jmp __alltraps
  10291c:	e9 a4 f6 ff ff       	jmp    101fc5 <__alltraps>

00102921 <vector230>:
.globl vector230
vector230:
  pushl $0
  102921:	6a 00                	push   $0x0
  pushl $230
  102923:	68 e6 00 00 00       	push   $0xe6
  jmp __alltraps
  102928:	e9 98 f6 ff ff       	jmp    101fc5 <__alltraps>

0010292d <vector231>:
.globl vector231
vector231:
  pushl $0
  10292d:	6a 00                	push   $0x0
  pushl $231
  10292f:	68 e7 00 00 00       	push   $0xe7
  jmp __alltraps
  102934:	e9 8c f6 ff ff       	jmp    101fc5 <__alltraps>

00102939 <vector232>:
.globl vector232
vector232:
  pushl $0
  102939:	6a 00                	push   $0x0
  pushl $232
  10293b:	68 e8 00 00 00       	push   $0xe8
  jmp __alltraps
  102940:	e9 80 f6 ff ff       	jmp    101fc5 <__alltraps>

00102945 <vector233>:
.globl vector233
vector233:
  pushl $0
  102945:	6a 00                	push   $0x0
  pushl $233
  102947:	68 e9 00 00 00       	push   $0xe9
  jmp __alltraps
  10294c:	e9 74 f6 ff ff       	jmp    101fc5 <__alltraps>

00102951 <vector234>:
.globl vector234
vector234:
  pushl $0
  102951:	6a 00                	push   $0x0
  pushl $234
  102953:	68 ea 00 00 00       	push   $0xea
  jmp __alltraps
  102958:	e9 68 f6 ff ff       	jmp    101fc5 <__alltraps>

0010295d <vector235>:
.globl vector235
vector235:
  pushl $0
  10295d:	6a 00                	push   $0x0
  pushl $235
  10295f:	68 eb 00 00 00       	push   $0xeb
  jmp __alltraps
  102964:	e9 5c f6 ff ff       	jmp    101fc5 <__alltraps>

00102969 <vector236>:
.globl vector236
vector236:
  pushl $0
  102969:	6a 00                	push   $0x0
  pushl $236
  10296b:	68 ec 00 00 00       	push   $0xec
  jmp __alltraps
  102970:	e9 50 f6 ff ff       	jmp    101fc5 <__alltraps>

00102975 <vector237>:
.globl vector237
vector237:
  pushl $0
  102975:	6a 00                	push   $0x0
  pushl $237
  102977:	68 ed 00 00 00       	push   $0xed
  jmp __alltraps
  10297c:	e9 44 f6 ff ff       	jmp    101fc5 <__alltraps>

00102981 <vector238>:
.globl vector238
vector238:
  pushl $0
  102981:	6a 00                	push   $0x0
  pushl $238
  102983:	68 ee 00 00 00       	push   $0xee
  jmp __alltraps
  102988:	e9 38 f6 ff ff       	jmp    101fc5 <__alltraps>

0010298d <vector239>:
.globl vector239
vector239:
  pushl $0
  10298d:	6a 00                	push   $0x0
  pushl $239
  10298f:	68 ef 00 00 00       	push   $0xef
  jmp __alltraps
  102994:	e9 2c f6 ff ff       	jmp    101fc5 <__alltraps>

00102999 <vector240>:
.globl vector240
vector240:
  pushl $0
  102999:	6a 00                	push   $0x0
  pushl $240
  10299b:	68 f0 00 00 00       	push   $0xf0
  jmp __alltraps
  1029a0:	e9 20 f6 ff ff       	jmp    101fc5 <__alltraps>

001029a5 <vector241>:
.globl vector241
vector241:
  pushl $0
  1029a5:	6a 00                	push   $0x0
  pushl $241
  1029a7:	68 f1 00 00 00       	push   $0xf1
  jmp __alltraps
  1029ac:	e9 14 f6 ff ff       	jmp    101fc5 <__alltraps>

001029b1 <vector242>:
.globl vector242
vector242:
  pushl $0
  1029b1:	6a 00                	push   $0x0
  pushl $242
  1029b3:	68 f2 00 00 00       	push   $0xf2
  jmp __alltraps
  1029b8:	e9 08 f6 ff ff       	jmp    101fc5 <__alltraps>

001029bd <vector243>:
.globl vector243
vector243:
  pushl $0
  1029bd:	6a 00                	push   $0x0
  pushl $243
  1029bf:	68 f3 00 00 00       	push   $0xf3
  jmp __alltraps
  1029c4:	e9 fc f5 ff ff       	jmp    101fc5 <__alltraps>

001029c9 <vector244>:
.globl vector244
vector244:
  pushl $0
  1029c9:	6a 00                	push   $0x0
  pushl $244
  1029cb:	68 f4 00 00 00       	push   $0xf4
  jmp __alltraps
  1029d0:	e9 f0 f5 ff ff       	jmp    101fc5 <__alltraps>

001029d5 <vector245>:
.globl vector245
vector245:
  pushl $0
  1029d5:	6a 00                	push   $0x0
  pushl $245
  1029d7:	68 f5 00 00 00       	push   $0xf5
  jmp __alltraps
  1029dc:	e9 e4 f5 ff ff       	jmp    101fc5 <__alltraps>

001029e1 <vector246>:
.globl vector246
vector246:
  pushl $0
  1029e1:	6a 00                	push   $0x0
  pushl $246
  1029e3:	68 f6 00 00 00       	push   $0xf6
  jmp __alltraps
  1029e8:	e9 d8 f5 ff ff       	jmp    101fc5 <__alltraps>

001029ed <vector247>:
.globl vector247
vector247:
  pushl $0
  1029ed:	6a 00                	push   $0x0
  pushl $247
  1029ef:	68 f7 00 00 00       	push   $0xf7
  jmp __alltraps
  1029f4:	e9 cc f5 ff ff       	jmp    101fc5 <__alltraps>

001029f9 <vector248>:
.globl vector248
vector248:
  pushl $0
  1029f9:	6a 00                	push   $0x0
  pushl $248
  1029fb:	68 f8 00 00 00       	push   $0xf8
  jmp __alltraps
  102a00:	e9 c0 f5 ff ff       	jmp    101fc5 <__alltraps>

00102a05 <vector249>:
.globl vector249
vector249:
  pushl $0
  102a05:	6a 00                	push   $0x0
  pushl $249
  102a07:	68 f9 00 00 00       	push   $0xf9
  jmp __alltraps
  102a0c:	e9 b4 f5 ff ff       	jmp    101fc5 <__alltraps>

00102a11 <vector250>:
.globl vector250
vector250:
  pushl $0
  102a11:	6a 00                	push   $0x0
  pushl $250
  102a13:	68 fa 00 00 00       	push   $0xfa
  jmp __alltraps
  102a18:	e9 a8 f5 ff ff       	jmp    101fc5 <__alltraps>

00102a1d <vector251>:
.globl vector251
vector251:
  pushl $0
  102a1d:	6a 00                	push   $0x0
  pushl $251
  102a1f:	68 fb 00 00 00       	push   $0xfb
  jmp __alltraps
  102a24:	e9 9c f5 ff ff       	jmp    101fc5 <__alltraps>

00102a29 <vector252>:
.globl vector252
vector252:
  pushl $0
  102a29:	6a 00                	push   $0x0
  pushl $252
  102a2b:	68 fc 00 00 00       	push   $0xfc
  jmp __alltraps
  102a30:	e9 90 f5 ff ff       	jmp    101fc5 <__alltraps>

00102a35 <vector253>:
.globl vector253
vector253:
  pushl $0
  102a35:	6a 00                	push   $0x0
  pushl $253
  102a37:	68 fd 00 00 00       	push   $0xfd
  jmp __alltraps
  102a3c:	e9 84 f5 ff ff       	jmp    101fc5 <__alltraps>

00102a41 <vector254>:
.globl vector254
vector254:
  pushl $0
  102a41:	6a 00                	push   $0x0
  pushl $254
  102a43:	68 fe 00 00 00       	push   $0xfe
  jmp __alltraps
  102a48:	e9 78 f5 ff ff       	jmp    101fc5 <__alltraps>

00102a4d <vector255>:
.globl vector255
vector255:
  pushl $0
  102a4d:	6a 00                	push   $0x0
  pushl $255
  102a4f:	68 ff 00 00 00       	push   $0xff
  jmp __alltraps
  102a54:	e9 6c f5 ff ff       	jmp    101fc5 <__alltraps>

00102a59 <lgdt>:
/* *
 * lgdt - load the global descriptor table register and reset the
 * data/code segement registers for kernel.
 * */
static inline void
lgdt(struct pseudodesc *pd) {
  102a59:	55                   	push   %ebp
  102a5a:	89 e5                	mov    %esp,%ebp
    asm volatile ("lgdt (%0)" :: "r" (pd));
  102a5c:	8b 45 08             	mov    0x8(%ebp),%eax
  102a5f:	0f 01 10             	lgdtl  (%eax)
    asm volatile ("movw %%ax, %%gs" :: "a" (USER_DS));
  102a62:	b8 23 00 00 00       	mov    $0x23,%eax
  102a67:	8e e8                	mov    %eax,%gs
    asm volatile ("movw %%ax, %%fs" :: "a" (USER_DS));
  102a69:	b8 23 00 00 00       	mov    $0x23,%eax
  102a6e:	8e e0                	mov    %eax,%fs
    asm volatile ("movw %%ax, %%es" :: "a" (KERNEL_DS));
  102a70:	b8 10 00 00 00       	mov    $0x10,%eax
  102a75:	8e c0                	mov    %eax,%es
    asm volatile ("movw %%ax, %%ds" :: "a" (KERNEL_DS));
  102a77:	b8 10 00 00 00       	mov    $0x10,%eax
  102a7c:	8e d8                	mov    %eax,%ds
    asm volatile ("movw %%ax, %%ss" :: "a" (KERNEL_DS));
  102a7e:	b8 10 00 00 00       	mov    $0x10,%eax
  102a83:	8e d0                	mov    %eax,%ss
    // reload cs
    asm volatile ("ljmp %0, $1f\n 1:\n" :: "i" (KERNEL_CS));
  102a85:	ea 8c 2a 10 00 08 00 	ljmp   $0x8,$0x102a8c
}
  102a8c:	90                   	nop
  102a8d:	5d                   	pop    %ebp
  102a8e:	c3                   	ret    

00102a8f <gdt_init>:
/* temporary kernel stack */
uint8_t stack0[1024];

/* gdt_init - initialize the default GDT and TSS */
static void
gdt_init(void) {
  102a8f:	55                   	push   %ebp
  102a90:	89 e5                	mov    %esp,%ebp
  102a92:	83 ec 14             	sub    $0x14,%esp
    // Setup a TSS so that we can get the right stack when we trap from
    // user to the kernel. But not safe here, it's only a temporary value,
    // it will be set to KSTACKTOP in lab2.
    ts.ts_esp0 = (uint32_t)&stack0 + sizeof(stack0);
  102a95:	b8 e0 08 11 00       	mov    $0x1108e0,%eax
  102a9a:	05 00 04 00 00       	add    $0x400,%eax
  102a9f:	a3 e4 0c 11 00       	mov    %eax,0x110ce4
    ts.ts_ss0 = KERNEL_DS;
  102aa4:	66 c7 05 e8 0c 11 00 	movw   $0x10,0x110ce8
  102aab:	10 00 

    // initialize the TSS filed of the gdt
    gdt[SEG_TSS] = SEG16(STS_T32A, (uint32_t)&ts, sizeof(ts), DPL_KERNEL);
  102aad:	66 c7 05 08 fa 10 00 	movw   $0x68,0x10fa08
  102ab4:	68 00 
  102ab6:	b8 e0 0c 11 00       	mov    $0x110ce0,%eax
  102abb:	0f b7 c0             	movzwl %ax,%eax
  102abe:	66 a3 0a fa 10 00    	mov    %ax,0x10fa0a
  102ac4:	b8 e0 0c 11 00       	mov    $0x110ce0,%eax
  102ac9:	c1 e8 10             	shr    $0x10,%eax
  102acc:	a2 0c fa 10 00       	mov    %al,0x10fa0c
  102ad1:	0f b6 05 0d fa 10 00 	movzbl 0x10fa0d,%eax
  102ad8:	24 f0                	and    $0xf0,%al
  102ada:	0c 09                	or     $0x9,%al
  102adc:	a2 0d fa 10 00       	mov    %al,0x10fa0d
  102ae1:	0f b6 05 0d fa 10 00 	movzbl 0x10fa0d,%eax
  102ae8:	0c 10                	or     $0x10,%al
  102aea:	a2 0d fa 10 00       	mov    %al,0x10fa0d
  102aef:	0f b6 05 0d fa 10 00 	movzbl 0x10fa0d,%eax
  102af6:	24 9f                	and    $0x9f,%al
  102af8:	a2 0d fa 10 00       	mov    %al,0x10fa0d
  102afd:	0f b6 05 0d fa 10 00 	movzbl 0x10fa0d,%eax
  102b04:	0c 80                	or     $0x80,%al
  102b06:	a2 0d fa 10 00       	mov    %al,0x10fa0d
  102b0b:	0f b6 05 0e fa 10 00 	movzbl 0x10fa0e,%eax
  102b12:	24 f0                	and    $0xf0,%al
  102b14:	a2 0e fa 10 00       	mov    %al,0x10fa0e
  102b19:	0f b6 05 0e fa 10 00 	movzbl 0x10fa0e,%eax
  102b20:	24 ef                	and    $0xef,%al
  102b22:	a2 0e fa 10 00       	mov    %al,0x10fa0e
  102b27:	0f b6 05 0e fa 10 00 	movzbl 0x10fa0e,%eax
  102b2e:	24 df                	and    $0xdf,%al
  102b30:	a2 0e fa 10 00       	mov    %al,0x10fa0e
  102b35:	0f b6 05 0e fa 10 00 	movzbl 0x10fa0e,%eax
  102b3c:	0c 40                	or     $0x40,%al
  102b3e:	a2 0e fa 10 00       	mov    %al,0x10fa0e
  102b43:	0f b6 05 0e fa 10 00 	movzbl 0x10fa0e,%eax
  102b4a:	24 7f                	and    $0x7f,%al
  102b4c:	a2 0e fa 10 00       	mov    %al,0x10fa0e
  102b51:	b8 e0 0c 11 00       	mov    $0x110ce0,%eax
  102b56:	c1 e8 18             	shr    $0x18,%eax
  102b59:	a2 0f fa 10 00       	mov    %al,0x10fa0f
    gdt[SEG_TSS].sd_s = 0;
  102b5e:	0f b6 05 0d fa 10 00 	movzbl 0x10fa0d,%eax
  102b65:	24 ef                	and    $0xef,%al
  102b67:	a2 0d fa 10 00       	mov    %al,0x10fa0d

    // reload all segment registers
    lgdt(&gdt_pd);
  102b6c:	c7 04 24 10 fa 10 00 	movl   $0x10fa10,(%esp)
  102b73:	e8 e1 fe ff ff       	call   102a59 <lgdt>
  102b78:	66 c7 45 fe 28 00    	movw   $0x28,-0x2(%ebp)

static inline void
ltr(uint16_t sel) {
    asm volatile ("ltr %0" :: "r" (sel));
  102b7e:	0f b7 45 fe          	movzwl -0x2(%ebp),%eax
  102b82:	0f 00 d8             	ltr    %ax
}
  102b85:	90                   	nop

    // load the TSS
    ltr(GD_TSS);
}
  102b86:	90                   	nop
  102b87:	89 ec                	mov    %ebp,%esp
  102b89:	5d                   	pop    %ebp
  102b8a:	c3                   	ret    

00102b8b <pmm_init>:

/* pmm_init - initialize the physical memory management */
void
pmm_init(void) {
  102b8b:	55                   	push   %ebp
  102b8c:	89 e5                	mov    %esp,%ebp
    gdt_init();
  102b8e:	e8 fc fe ff ff       	call   102a8f <gdt_init>
}
  102b93:	90                   	nop
  102b94:	5d                   	pop    %ebp
  102b95:	c3                   	ret    

00102b96 <printnum>:
 * @width:         maximum number of digits, if the actual width is less than @width, use @padc instead
 * @padc:        character that padded on the left if the actual width is less than @width
 * */
static void
printnum(void (*putch)(int, void*), void *putdat,
        unsigned long long num, unsigned base, int width, int padc) {
  102b96:	55                   	push   %ebp
  102b97:	89 e5                	mov    %esp,%ebp
  102b99:	83 ec 58             	sub    $0x58,%esp
  102b9c:	8b 45 10             	mov    0x10(%ebp),%eax
  102b9f:	89 45 d0             	mov    %eax,-0x30(%ebp)
  102ba2:	8b 45 14             	mov    0x14(%ebp),%eax
  102ba5:	89 45 d4             	mov    %eax,-0x2c(%ebp)
    unsigned long long result = num;
  102ba8:	8b 45 d0             	mov    -0x30(%ebp),%eax
  102bab:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  102bae:	89 45 e8             	mov    %eax,-0x18(%ebp)
  102bb1:	89 55 ec             	mov    %edx,-0x14(%ebp)
    unsigned mod = do_div(result, base);
  102bb4:	8b 45 18             	mov    0x18(%ebp),%eax
  102bb7:	89 45 e4             	mov    %eax,-0x1c(%ebp)
  102bba:	8b 45 e8             	mov    -0x18(%ebp),%eax
  102bbd:	8b 55 ec             	mov    -0x14(%ebp),%edx
  102bc0:	89 45 e0             	mov    %eax,-0x20(%ebp)
  102bc3:	89 55 f0             	mov    %edx,-0x10(%ebp)
  102bc6:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102bc9:	89 45 f4             	mov    %eax,-0xc(%ebp)
  102bcc:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  102bd0:	74 1c                	je     102bee <printnum+0x58>
  102bd2:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102bd5:	ba 00 00 00 00       	mov    $0x0,%edx
  102bda:	f7 75 e4             	divl   -0x1c(%ebp)
  102bdd:	89 55 f4             	mov    %edx,-0xc(%ebp)
  102be0:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102be3:	ba 00 00 00 00       	mov    $0x0,%edx
  102be8:	f7 75 e4             	divl   -0x1c(%ebp)
  102beb:	89 45 f0             	mov    %eax,-0x10(%ebp)
  102bee:	8b 45 e0             	mov    -0x20(%ebp),%eax
  102bf1:	8b 55 f4             	mov    -0xc(%ebp),%edx
  102bf4:	f7 75 e4             	divl   -0x1c(%ebp)
  102bf7:	89 45 e0             	mov    %eax,-0x20(%ebp)
  102bfa:	89 55 dc             	mov    %edx,-0x24(%ebp)
  102bfd:	8b 45 e0             	mov    -0x20(%ebp),%eax
  102c00:	8b 55 f0             	mov    -0x10(%ebp),%edx
  102c03:	89 45 e8             	mov    %eax,-0x18(%ebp)
  102c06:	89 55 ec             	mov    %edx,-0x14(%ebp)
  102c09:	8b 45 dc             	mov    -0x24(%ebp),%eax
  102c0c:	89 45 d8             	mov    %eax,-0x28(%ebp)

    // first recursively print all preceding (more significant) digits
    if (num >= base) {
  102c0f:	8b 45 18             	mov    0x18(%ebp),%eax
  102c12:	ba 00 00 00 00       	mov    $0x0,%edx
  102c17:	8b 4d d4             	mov    -0x2c(%ebp),%ecx
  102c1a:	39 45 d0             	cmp    %eax,-0x30(%ebp)
  102c1d:	19 d1                	sbb    %edx,%ecx
  102c1f:	72 4c                	jb     102c6d <printnum+0xd7>
        printnum(putch, putdat, result, base, width - 1, padc);
  102c21:	8b 45 1c             	mov    0x1c(%ebp),%eax
  102c24:	8d 50 ff             	lea    -0x1(%eax),%edx
  102c27:	8b 45 20             	mov    0x20(%ebp),%eax
  102c2a:	89 44 24 18          	mov    %eax,0x18(%esp)
  102c2e:	89 54 24 14          	mov    %edx,0x14(%esp)
  102c32:	8b 45 18             	mov    0x18(%ebp),%eax
  102c35:	89 44 24 10          	mov    %eax,0x10(%esp)
  102c39:	8b 45 e8             	mov    -0x18(%ebp),%eax
  102c3c:	8b 55 ec             	mov    -0x14(%ebp),%edx
  102c3f:	89 44 24 08          	mov    %eax,0x8(%esp)
  102c43:	89 54 24 0c          	mov    %edx,0xc(%esp)
  102c47:	8b 45 0c             	mov    0xc(%ebp),%eax
  102c4a:	89 44 24 04          	mov    %eax,0x4(%esp)
  102c4e:	8b 45 08             	mov    0x8(%ebp),%eax
  102c51:	89 04 24             	mov    %eax,(%esp)
  102c54:	e8 3d ff ff ff       	call   102b96 <printnum>
  102c59:	eb 1b                	jmp    102c76 <printnum+0xe0>
    } else {
        // print any needed pad characters before first digit
        while (-- width > 0)
            putch(padc, putdat);
  102c5b:	8b 45 0c             	mov    0xc(%ebp),%eax
  102c5e:	89 44 24 04          	mov    %eax,0x4(%esp)
  102c62:	8b 45 20             	mov    0x20(%ebp),%eax
  102c65:	89 04 24             	mov    %eax,(%esp)
  102c68:	8b 45 08             	mov    0x8(%ebp),%eax
  102c6b:	ff d0                	call   *%eax
        while (-- width > 0)
  102c6d:	ff 4d 1c             	decl   0x1c(%ebp)
  102c70:	83 7d 1c 00          	cmpl   $0x0,0x1c(%ebp)
  102c74:	7f e5                	jg     102c5b <printnum+0xc5>
    }
    // then print this (the least significant) digit
    putch("0123456789abcdef"[mod], putdat);
  102c76:	8b 45 d8             	mov    -0x28(%ebp),%eax
  102c79:	05 50 3e 10 00       	add    $0x103e50,%eax
  102c7e:	0f b6 00             	movzbl (%eax),%eax
  102c81:	0f be c0             	movsbl %al,%eax
  102c84:	8b 55 0c             	mov    0xc(%ebp),%edx
  102c87:	89 54 24 04          	mov    %edx,0x4(%esp)
  102c8b:	89 04 24             	mov    %eax,(%esp)
  102c8e:	8b 45 08             	mov    0x8(%ebp),%eax
  102c91:	ff d0                	call   *%eax
}
  102c93:	90                   	nop
  102c94:	89 ec                	mov    %ebp,%esp
  102c96:	5d                   	pop    %ebp
  102c97:	c3                   	ret    

00102c98 <getuint>:
 * getuint - get an unsigned int of various possible sizes from a varargs list
 * @ap:            a varargs list pointer
 * @lflag:        determines the size of the vararg that @ap points to
 * */
static unsigned long long
getuint(va_list *ap, int lflag) {
  102c98:	55                   	push   %ebp
  102c99:	89 e5                	mov    %esp,%ebp
    if (lflag >= 2) {
  102c9b:	83 7d 0c 01          	cmpl   $0x1,0xc(%ebp)
  102c9f:	7e 14                	jle    102cb5 <getuint+0x1d>
        return va_arg(*ap, unsigned long long);
  102ca1:	8b 45 08             	mov    0x8(%ebp),%eax
  102ca4:	8b 00                	mov    (%eax),%eax
  102ca6:	8d 48 08             	lea    0x8(%eax),%ecx
  102ca9:	8b 55 08             	mov    0x8(%ebp),%edx
  102cac:	89 0a                	mov    %ecx,(%edx)
  102cae:	8b 50 04             	mov    0x4(%eax),%edx
  102cb1:	8b 00                	mov    (%eax),%eax
  102cb3:	eb 30                	jmp    102ce5 <getuint+0x4d>
    }
    else if (lflag) {
  102cb5:	83 7d 0c 00          	cmpl   $0x0,0xc(%ebp)
  102cb9:	74 16                	je     102cd1 <getuint+0x39>
        return va_arg(*ap, unsigned long);
  102cbb:	8b 45 08             	mov    0x8(%ebp),%eax
  102cbe:	8b 00                	mov    (%eax),%eax
  102cc0:	8d 48 04             	lea    0x4(%eax),%ecx
  102cc3:	8b 55 08             	mov    0x8(%ebp),%edx
  102cc6:	89 0a                	mov    %ecx,(%edx)
  102cc8:	8b 00                	mov    (%eax),%eax
  102cca:	ba 00 00 00 00       	mov    $0x0,%edx
  102ccf:	eb 14                	jmp    102ce5 <getuint+0x4d>
    }
    else {
        return va_arg(*ap, unsigned int);
  102cd1:	8b 45 08             	mov    0x8(%ebp),%eax
  102cd4:	8b 00                	mov    (%eax),%eax
  102cd6:	8d 48 04             	lea    0x4(%eax),%ecx
  102cd9:	8b 55 08             	mov    0x8(%ebp),%edx
  102cdc:	89 0a                	mov    %ecx,(%edx)
  102cde:	8b 00                	mov    (%eax),%eax
  102ce0:	ba 00 00 00 00       	mov    $0x0,%edx
    }
}
  102ce5:	5d                   	pop    %ebp
  102ce6:	c3                   	ret    

00102ce7 <getint>:
 * getint - same as getuint but signed, we can't use getuint because of sign extension
 * @ap:            a varargs list pointer
 * @lflag:        determines the size of the vararg that @ap points to
 * */
static long long
getint(va_list *ap, int lflag) {
  102ce7:	55                   	push   %ebp
  102ce8:	89 e5                	mov    %esp,%ebp
    if (lflag >= 2) {
  102cea:	83 7d 0c 01          	cmpl   $0x1,0xc(%ebp)
  102cee:	7e 14                	jle    102d04 <getint+0x1d>
        return va_arg(*ap, long long);
  102cf0:	8b 45 08             	mov    0x8(%ebp),%eax
  102cf3:	8b 00                	mov    (%eax),%eax
  102cf5:	8d 48 08             	lea    0x8(%eax),%ecx
  102cf8:	8b 55 08             	mov    0x8(%ebp),%edx
  102cfb:	89 0a                	mov    %ecx,(%edx)
  102cfd:	8b 50 04             	mov    0x4(%eax),%edx
  102d00:	8b 00                	mov    (%eax),%eax
  102d02:	eb 28                	jmp    102d2c <getint+0x45>
    }
    else if (lflag) {
  102d04:	83 7d 0c 00          	cmpl   $0x0,0xc(%ebp)
  102d08:	74 12                	je     102d1c <getint+0x35>
        return va_arg(*ap, long);
  102d0a:	8b 45 08             	mov    0x8(%ebp),%eax
  102d0d:	8b 00                	mov    (%eax),%eax
  102d0f:	8d 48 04             	lea    0x4(%eax),%ecx
  102d12:	8b 55 08             	mov    0x8(%ebp),%edx
  102d15:	89 0a                	mov    %ecx,(%edx)
  102d17:	8b 00                	mov    (%eax),%eax
  102d19:	99                   	cltd   
  102d1a:	eb 10                	jmp    102d2c <getint+0x45>
    }
    else {
        return va_arg(*ap, int);
  102d1c:	8b 45 08             	mov    0x8(%ebp),%eax
  102d1f:	8b 00                	mov    (%eax),%eax
  102d21:	8d 48 04             	lea    0x4(%eax),%ecx
  102d24:	8b 55 08             	mov    0x8(%ebp),%edx
  102d27:	89 0a                	mov    %ecx,(%edx)
  102d29:	8b 00                	mov    (%eax),%eax
  102d2b:	99                   	cltd   
    }
}
  102d2c:	5d                   	pop    %ebp
  102d2d:	c3                   	ret    

00102d2e <printfmt>:
 * @putch:        specified putch function, print a single character
 * @putdat:        used by @putch function
 * @fmt:        the format string to use
 * */
void
printfmt(void (*putch)(int, void*), void *putdat, const char *fmt, ...) {
  102d2e:	55                   	push   %ebp
  102d2f:	89 e5                	mov    %esp,%ebp
  102d31:	83 ec 28             	sub    $0x28,%esp
    va_list ap;

    va_start(ap, fmt);
  102d34:	8d 45 14             	lea    0x14(%ebp),%eax
  102d37:	89 45 f4             	mov    %eax,-0xc(%ebp)
    vprintfmt(putch, putdat, fmt, ap);
  102d3a:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102d3d:	89 44 24 0c          	mov    %eax,0xc(%esp)
  102d41:	8b 45 10             	mov    0x10(%ebp),%eax
  102d44:	89 44 24 08          	mov    %eax,0x8(%esp)
  102d48:	8b 45 0c             	mov    0xc(%ebp),%eax
  102d4b:	89 44 24 04          	mov    %eax,0x4(%esp)
  102d4f:	8b 45 08             	mov    0x8(%ebp),%eax
  102d52:	89 04 24             	mov    %eax,(%esp)
  102d55:	e8 05 00 00 00       	call   102d5f <vprintfmt>
    va_end(ap);
}
  102d5a:	90                   	nop
  102d5b:	89 ec                	mov    %ebp,%esp
  102d5d:	5d                   	pop    %ebp
  102d5e:	c3                   	ret    

00102d5f <vprintfmt>:
 *
 * Call this function if you are already dealing with a va_list.
 * Or you probably want printfmt() instead.
 * */
void
vprintfmt(void (*putch)(int, void*), void *putdat, const char *fmt, va_list ap) {
  102d5f:	55                   	push   %ebp
  102d60:	89 e5                	mov    %esp,%ebp
  102d62:	56                   	push   %esi
  102d63:	53                   	push   %ebx
  102d64:	83 ec 40             	sub    $0x40,%esp
    register int ch, err;
    unsigned long long num;
    int base, width, precision, lflag, altflag;

    while (1) {
        while ((ch = *(unsigned char *)fmt ++) != '%') {
  102d67:	eb 17                	jmp    102d80 <vprintfmt+0x21>
            if (ch == '\0') {
  102d69:	85 db                	test   %ebx,%ebx
  102d6b:	0f 84 bf 03 00 00    	je     103130 <vprintfmt+0x3d1>
                return;
            }
            putch(ch, putdat);
  102d71:	8b 45 0c             	mov    0xc(%ebp),%eax
  102d74:	89 44 24 04          	mov    %eax,0x4(%esp)
  102d78:	89 1c 24             	mov    %ebx,(%esp)
  102d7b:	8b 45 08             	mov    0x8(%ebp),%eax
  102d7e:	ff d0                	call   *%eax
        while ((ch = *(unsigned char *)fmt ++) != '%') {
  102d80:	8b 45 10             	mov    0x10(%ebp),%eax
  102d83:	8d 50 01             	lea    0x1(%eax),%edx
  102d86:	89 55 10             	mov    %edx,0x10(%ebp)
  102d89:	0f b6 00             	movzbl (%eax),%eax
  102d8c:	0f b6 d8             	movzbl %al,%ebx
  102d8f:	83 fb 25             	cmp    $0x25,%ebx
  102d92:	75 d5                	jne    102d69 <vprintfmt+0xa>
        }

        // Process a %-escape sequence
        char padc = ' ';
  102d94:	c6 45 db 20          	movb   $0x20,-0x25(%ebp)
        width = precision = -1;
  102d98:	c7 45 e4 ff ff ff ff 	movl   $0xffffffff,-0x1c(%ebp)
  102d9f:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  102da2:	89 45 e8             	mov    %eax,-0x18(%ebp)
        lflag = altflag = 0;
  102da5:	c7 45 dc 00 00 00 00 	movl   $0x0,-0x24(%ebp)
  102dac:	8b 45 dc             	mov    -0x24(%ebp),%eax
  102daf:	89 45 e0             	mov    %eax,-0x20(%ebp)

    reswitch:
        switch (ch = *(unsigned char *)fmt ++) {
  102db2:	8b 45 10             	mov    0x10(%ebp),%eax
  102db5:	8d 50 01             	lea    0x1(%eax),%edx
  102db8:	89 55 10             	mov    %edx,0x10(%ebp)
  102dbb:	0f b6 00             	movzbl (%eax),%eax
  102dbe:	0f b6 d8             	movzbl %al,%ebx
  102dc1:	8d 43 dd             	lea    -0x23(%ebx),%eax
  102dc4:	83 f8 55             	cmp    $0x55,%eax
  102dc7:	0f 87 37 03 00 00    	ja     103104 <vprintfmt+0x3a5>
  102dcd:	8b 04 85 74 3e 10 00 	mov    0x103e74(,%eax,4),%eax
  102dd4:	ff e0                	jmp    *%eax

        // flag to pad on the right
        case '-':
            padc = '-';
  102dd6:	c6 45 db 2d          	movb   $0x2d,-0x25(%ebp)
            goto reswitch;
  102dda:	eb d6                	jmp    102db2 <vprintfmt+0x53>

        // flag to pad with 0's instead of spaces
        case '0':
            padc = '0';
  102ddc:	c6 45 db 30          	movb   $0x30,-0x25(%ebp)
            goto reswitch;
  102de0:	eb d0                	jmp    102db2 <vprintfmt+0x53>

        // width field
        case '1' ... '9':
            for (precision = 0; ; ++ fmt) {
  102de2:	c7 45 e4 00 00 00 00 	movl   $0x0,-0x1c(%ebp)
                precision = precision * 10 + ch - '0';
  102de9:	8b 55 e4             	mov    -0x1c(%ebp),%edx
  102dec:	89 d0                	mov    %edx,%eax
  102dee:	c1 e0 02             	shl    $0x2,%eax
  102df1:	01 d0                	add    %edx,%eax
  102df3:	01 c0                	add    %eax,%eax
  102df5:	01 d8                	add    %ebx,%eax
  102df7:	83 e8 30             	sub    $0x30,%eax
  102dfa:	89 45 e4             	mov    %eax,-0x1c(%ebp)
                ch = *fmt;
  102dfd:	8b 45 10             	mov    0x10(%ebp),%eax
  102e00:	0f b6 00             	movzbl (%eax),%eax
  102e03:	0f be d8             	movsbl %al,%ebx
                if (ch < '0' || ch > '9') {
  102e06:	83 fb 2f             	cmp    $0x2f,%ebx
  102e09:	7e 38                	jle    102e43 <vprintfmt+0xe4>
  102e0b:	83 fb 39             	cmp    $0x39,%ebx
  102e0e:	7f 33                	jg     102e43 <vprintfmt+0xe4>
            for (precision = 0; ; ++ fmt) {
  102e10:	ff 45 10             	incl   0x10(%ebp)
                precision = precision * 10 + ch - '0';
  102e13:	eb d4                	jmp    102de9 <vprintfmt+0x8a>
                }
            }
            goto process_precision;

        case '*':
            precision = va_arg(ap, int);
  102e15:	8b 45 14             	mov    0x14(%ebp),%eax
  102e18:	8d 50 04             	lea    0x4(%eax),%edx
  102e1b:	89 55 14             	mov    %edx,0x14(%ebp)
  102e1e:	8b 00                	mov    (%eax),%eax
  102e20:	89 45 e4             	mov    %eax,-0x1c(%ebp)
            goto process_precision;
  102e23:	eb 1f                	jmp    102e44 <vprintfmt+0xe5>

        case '.':
            if (width < 0)
  102e25:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  102e29:	79 87                	jns    102db2 <vprintfmt+0x53>
                width = 0;
  102e2b:	c7 45 e8 00 00 00 00 	movl   $0x0,-0x18(%ebp)
            goto reswitch;
  102e32:	e9 7b ff ff ff       	jmp    102db2 <vprintfmt+0x53>

        case '#':
            altflag = 1;
  102e37:	c7 45 dc 01 00 00 00 	movl   $0x1,-0x24(%ebp)
            goto reswitch;
  102e3e:	e9 6f ff ff ff       	jmp    102db2 <vprintfmt+0x53>
            goto process_precision;
  102e43:	90                   	nop

        process_precision:
            if (width < 0)
  102e44:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  102e48:	0f 89 64 ff ff ff    	jns    102db2 <vprintfmt+0x53>
                width = precision, precision = -1;
  102e4e:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  102e51:	89 45 e8             	mov    %eax,-0x18(%ebp)
  102e54:	c7 45 e4 ff ff ff ff 	movl   $0xffffffff,-0x1c(%ebp)
            goto reswitch;
  102e5b:	e9 52 ff ff ff       	jmp    102db2 <vprintfmt+0x53>

        // long flag (doubled for long long)
        case 'l':
            lflag ++;
  102e60:	ff 45 e0             	incl   -0x20(%ebp)
            goto reswitch;
  102e63:	e9 4a ff ff ff       	jmp    102db2 <vprintfmt+0x53>

        // character
        case 'c':
            putch(va_arg(ap, int), putdat);
  102e68:	8b 45 14             	mov    0x14(%ebp),%eax
  102e6b:	8d 50 04             	lea    0x4(%eax),%edx
  102e6e:	89 55 14             	mov    %edx,0x14(%ebp)
  102e71:	8b 00                	mov    (%eax),%eax
  102e73:	8b 55 0c             	mov    0xc(%ebp),%edx
  102e76:	89 54 24 04          	mov    %edx,0x4(%esp)
  102e7a:	89 04 24             	mov    %eax,(%esp)
  102e7d:	8b 45 08             	mov    0x8(%ebp),%eax
  102e80:	ff d0                	call   *%eax
            break;
  102e82:	e9 a4 02 00 00       	jmp    10312b <vprintfmt+0x3cc>

        // error message
        case 'e':
            err = va_arg(ap, int);
  102e87:	8b 45 14             	mov    0x14(%ebp),%eax
  102e8a:	8d 50 04             	lea    0x4(%eax),%edx
  102e8d:	89 55 14             	mov    %edx,0x14(%ebp)
  102e90:	8b 18                	mov    (%eax),%ebx
            if (err < 0) {
  102e92:	85 db                	test   %ebx,%ebx
  102e94:	79 02                	jns    102e98 <vprintfmt+0x139>
                err = -err;
  102e96:	f7 db                	neg    %ebx
            }
            if (err > MAXERROR || (p = error_string[err]) == NULL) {
  102e98:	83 fb 06             	cmp    $0x6,%ebx
  102e9b:	7f 0b                	jg     102ea8 <vprintfmt+0x149>
  102e9d:	8b 34 9d 34 3e 10 00 	mov    0x103e34(,%ebx,4),%esi
  102ea4:	85 f6                	test   %esi,%esi
  102ea6:	75 23                	jne    102ecb <vprintfmt+0x16c>
                printfmt(putch, putdat, "error %d", err);
  102ea8:	89 5c 24 0c          	mov    %ebx,0xc(%esp)
  102eac:	c7 44 24 08 61 3e 10 	movl   $0x103e61,0x8(%esp)
  102eb3:	00 
  102eb4:	8b 45 0c             	mov    0xc(%ebp),%eax
  102eb7:	89 44 24 04          	mov    %eax,0x4(%esp)
  102ebb:	8b 45 08             	mov    0x8(%ebp),%eax
  102ebe:	89 04 24             	mov    %eax,(%esp)
  102ec1:	e8 68 fe ff ff       	call   102d2e <printfmt>
            }
            else {
                printfmt(putch, putdat, "%s", p);
            }
            break;
  102ec6:	e9 60 02 00 00       	jmp    10312b <vprintfmt+0x3cc>
                printfmt(putch, putdat, "%s", p);
  102ecb:	89 74 24 0c          	mov    %esi,0xc(%esp)
  102ecf:	c7 44 24 08 6a 3e 10 	movl   $0x103e6a,0x8(%esp)
  102ed6:	00 
  102ed7:	8b 45 0c             	mov    0xc(%ebp),%eax
  102eda:	89 44 24 04          	mov    %eax,0x4(%esp)
  102ede:	8b 45 08             	mov    0x8(%ebp),%eax
  102ee1:	89 04 24             	mov    %eax,(%esp)
  102ee4:	e8 45 fe ff ff       	call   102d2e <printfmt>
            break;
  102ee9:	e9 3d 02 00 00       	jmp    10312b <vprintfmt+0x3cc>

        // string
        case 's':
            if ((p = va_arg(ap, char *)) == NULL) {
  102eee:	8b 45 14             	mov    0x14(%ebp),%eax
  102ef1:	8d 50 04             	lea    0x4(%eax),%edx
  102ef4:	89 55 14             	mov    %edx,0x14(%ebp)
  102ef7:	8b 30                	mov    (%eax),%esi
  102ef9:	85 f6                	test   %esi,%esi
  102efb:	75 05                	jne    102f02 <vprintfmt+0x1a3>
                p = "(null)";
  102efd:	be 6d 3e 10 00       	mov    $0x103e6d,%esi
            }
            if (width > 0 && padc != '-') {
  102f02:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  102f06:	7e 76                	jle    102f7e <vprintfmt+0x21f>
  102f08:	80 7d db 2d          	cmpb   $0x2d,-0x25(%ebp)
  102f0c:	74 70                	je     102f7e <vprintfmt+0x21f>
                for (width -= strnlen(p, precision); width > 0; width --) {
  102f0e:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  102f11:	89 44 24 04          	mov    %eax,0x4(%esp)
  102f15:	89 34 24             	mov    %esi,(%esp)
  102f18:	e8 16 03 00 00       	call   103233 <strnlen>
  102f1d:	89 c2                	mov    %eax,%edx
  102f1f:	8b 45 e8             	mov    -0x18(%ebp),%eax
  102f22:	29 d0                	sub    %edx,%eax
  102f24:	89 45 e8             	mov    %eax,-0x18(%ebp)
  102f27:	eb 16                	jmp    102f3f <vprintfmt+0x1e0>
                    putch(padc, putdat);
  102f29:	0f be 45 db          	movsbl -0x25(%ebp),%eax
  102f2d:	8b 55 0c             	mov    0xc(%ebp),%edx
  102f30:	89 54 24 04          	mov    %edx,0x4(%esp)
  102f34:	89 04 24             	mov    %eax,(%esp)
  102f37:	8b 45 08             	mov    0x8(%ebp),%eax
  102f3a:	ff d0                	call   *%eax
                for (width -= strnlen(p, precision); width > 0; width --) {
  102f3c:	ff 4d e8             	decl   -0x18(%ebp)
  102f3f:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  102f43:	7f e4                	jg     102f29 <vprintfmt+0x1ca>
                }
            }
            for (; (ch = *p ++) != '\0' && (precision < 0 || -- precision >= 0); width --) {
  102f45:	eb 37                	jmp    102f7e <vprintfmt+0x21f>
                if (altflag && (ch < ' ' || ch > '~')) {
  102f47:	83 7d dc 00          	cmpl   $0x0,-0x24(%ebp)
  102f4b:	74 1f                	je     102f6c <vprintfmt+0x20d>
  102f4d:	83 fb 1f             	cmp    $0x1f,%ebx
  102f50:	7e 05                	jle    102f57 <vprintfmt+0x1f8>
  102f52:	83 fb 7e             	cmp    $0x7e,%ebx
  102f55:	7e 15                	jle    102f6c <vprintfmt+0x20d>
                    putch('?', putdat);
  102f57:	8b 45 0c             	mov    0xc(%ebp),%eax
  102f5a:	89 44 24 04          	mov    %eax,0x4(%esp)
  102f5e:	c7 04 24 3f 00 00 00 	movl   $0x3f,(%esp)
  102f65:	8b 45 08             	mov    0x8(%ebp),%eax
  102f68:	ff d0                	call   *%eax
  102f6a:	eb 0f                	jmp    102f7b <vprintfmt+0x21c>
                }
                else {
                    putch(ch, putdat);
  102f6c:	8b 45 0c             	mov    0xc(%ebp),%eax
  102f6f:	89 44 24 04          	mov    %eax,0x4(%esp)
  102f73:	89 1c 24             	mov    %ebx,(%esp)
  102f76:	8b 45 08             	mov    0x8(%ebp),%eax
  102f79:	ff d0                	call   *%eax
            for (; (ch = *p ++) != '\0' && (precision < 0 || -- precision >= 0); width --) {
  102f7b:	ff 4d e8             	decl   -0x18(%ebp)
  102f7e:	89 f0                	mov    %esi,%eax
  102f80:	8d 70 01             	lea    0x1(%eax),%esi
  102f83:	0f b6 00             	movzbl (%eax),%eax
  102f86:	0f be d8             	movsbl %al,%ebx
  102f89:	85 db                	test   %ebx,%ebx
  102f8b:	74 27                	je     102fb4 <vprintfmt+0x255>
  102f8d:	83 7d e4 00          	cmpl   $0x0,-0x1c(%ebp)
  102f91:	78 b4                	js     102f47 <vprintfmt+0x1e8>
  102f93:	ff 4d e4             	decl   -0x1c(%ebp)
  102f96:	83 7d e4 00          	cmpl   $0x0,-0x1c(%ebp)
  102f9a:	79 ab                	jns    102f47 <vprintfmt+0x1e8>
                }
            }
            for (; width > 0; width --) {
  102f9c:	eb 16                	jmp    102fb4 <vprintfmt+0x255>
                putch(' ', putdat);
  102f9e:	8b 45 0c             	mov    0xc(%ebp),%eax
  102fa1:	89 44 24 04          	mov    %eax,0x4(%esp)
  102fa5:	c7 04 24 20 00 00 00 	movl   $0x20,(%esp)
  102fac:	8b 45 08             	mov    0x8(%ebp),%eax
  102faf:	ff d0                	call   *%eax
            for (; width > 0; width --) {
  102fb1:	ff 4d e8             	decl   -0x18(%ebp)
  102fb4:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  102fb8:	7f e4                	jg     102f9e <vprintfmt+0x23f>
            }
            break;
  102fba:	e9 6c 01 00 00       	jmp    10312b <vprintfmt+0x3cc>

        // (signed) decimal
        case 'd':
            num = getint(&ap, lflag);
  102fbf:	8b 45 e0             	mov    -0x20(%ebp),%eax
  102fc2:	89 44 24 04          	mov    %eax,0x4(%esp)
  102fc6:	8d 45 14             	lea    0x14(%ebp),%eax
  102fc9:	89 04 24             	mov    %eax,(%esp)
  102fcc:	e8 16 fd ff ff       	call   102ce7 <getint>
  102fd1:	89 45 f0             	mov    %eax,-0x10(%ebp)
  102fd4:	89 55 f4             	mov    %edx,-0xc(%ebp)
            if ((long long)num < 0) {
  102fd7:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102fda:	8b 55 f4             	mov    -0xc(%ebp),%edx
  102fdd:	85 d2                	test   %edx,%edx
  102fdf:	79 26                	jns    103007 <vprintfmt+0x2a8>
                putch('-', putdat);
  102fe1:	8b 45 0c             	mov    0xc(%ebp),%eax
  102fe4:	89 44 24 04          	mov    %eax,0x4(%esp)
  102fe8:	c7 04 24 2d 00 00 00 	movl   $0x2d,(%esp)
  102fef:	8b 45 08             	mov    0x8(%ebp),%eax
  102ff2:	ff d0                	call   *%eax
                num = -(long long)num;
  102ff4:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102ff7:	8b 55 f4             	mov    -0xc(%ebp),%edx
  102ffa:	f7 d8                	neg    %eax
  102ffc:	83 d2 00             	adc    $0x0,%edx
  102fff:	f7 da                	neg    %edx
  103001:	89 45 f0             	mov    %eax,-0x10(%ebp)
  103004:	89 55 f4             	mov    %edx,-0xc(%ebp)
            }
            base = 10;
  103007:	c7 45 ec 0a 00 00 00 	movl   $0xa,-0x14(%ebp)
            goto number;
  10300e:	e9 a8 00 00 00       	jmp    1030bb <vprintfmt+0x35c>

        // unsigned decimal
        case 'u':
            num = getuint(&ap, lflag);
  103013:	8b 45 e0             	mov    -0x20(%ebp),%eax
  103016:	89 44 24 04          	mov    %eax,0x4(%esp)
  10301a:	8d 45 14             	lea    0x14(%ebp),%eax
  10301d:	89 04 24             	mov    %eax,(%esp)
  103020:	e8 73 fc ff ff       	call   102c98 <getuint>
  103025:	89 45 f0             	mov    %eax,-0x10(%ebp)
  103028:	89 55 f4             	mov    %edx,-0xc(%ebp)
            base = 10;
  10302b:	c7 45 ec 0a 00 00 00 	movl   $0xa,-0x14(%ebp)
            goto number;
  103032:	e9 84 00 00 00       	jmp    1030bb <vprintfmt+0x35c>

        // (unsigned) octal
        case 'o':
            num = getuint(&ap, lflag);
  103037:	8b 45 e0             	mov    -0x20(%ebp),%eax
  10303a:	89 44 24 04          	mov    %eax,0x4(%esp)
  10303e:	8d 45 14             	lea    0x14(%ebp),%eax
  103041:	89 04 24             	mov    %eax,(%esp)
  103044:	e8 4f fc ff ff       	call   102c98 <getuint>
  103049:	89 45 f0             	mov    %eax,-0x10(%ebp)
  10304c:	89 55 f4             	mov    %edx,-0xc(%ebp)
            base = 8;
  10304f:	c7 45 ec 08 00 00 00 	movl   $0x8,-0x14(%ebp)
            goto number;
  103056:	eb 63                	jmp    1030bb <vprintfmt+0x35c>

        // pointer
        case 'p':
            putch('0', putdat);
  103058:	8b 45 0c             	mov    0xc(%ebp),%eax
  10305b:	89 44 24 04          	mov    %eax,0x4(%esp)
  10305f:	c7 04 24 30 00 00 00 	movl   $0x30,(%esp)
  103066:	8b 45 08             	mov    0x8(%ebp),%eax
  103069:	ff d0                	call   *%eax
            putch('x', putdat);
  10306b:	8b 45 0c             	mov    0xc(%ebp),%eax
  10306e:	89 44 24 04          	mov    %eax,0x4(%esp)
  103072:	c7 04 24 78 00 00 00 	movl   $0x78,(%esp)
  103079:	8b 45 08             	mov    0x8(%ebp),%eax
  10307c:	ff d0                	call   *%eax
            num = (unsigned long long)(uintptr_t)va_arg(ap, void *);
  10307e:	8b 45 14             	mov    0x14(%ebp),%eax
  103081:	8d 50 04             	lea    0x4(%eax),%edx
  103084:	89 55 14             	mov    %edx,0x14(%ebp)
  103087:	8b 00                	mov    (%eax),%eax
  103089:	89 45 f0             	mov    %eax,-0x10(%ebp)
  10308c:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
            base = 16;
  103093:	c7 45 ec 10 00 00 00 	movl   $0x10,-0x14(%ebp)
            goto number;
  10309a:	eb 1f                	jmp    1030bb <vprintfmt+0x35c>

        // (unsigned) hexadecimal
        case 'x':
            num = getuint(&ap, lflag);
  10309c:	8b 45 e0             	mov    -0x20(%ebp),%eax
  10309f:	89 44 24 04          	mov    %eax,0x4(%esp)
  1030a3:	8d 45 14             	lea    0x14(%ebp),%eax
  1030a6:	89 04 24             	mov    %eax,(%esp)
  1030a9:	e8 ea fb ff ff       	call   102c98 <getuint>
  1030ae:	89 45 f0             	mov    %eax,-0x10(%ebp)
  1030b1:	89 55 f4             	mov    %edx,-0xc(%ebp)
            base = 16;
  1030b4:	c7 45 ec 10 00 00 00 	movl   $0x10,-0x14(%ebp)
        number:
            printnum(putch, putdat, num, base, width, padc);
  1030bb:	0f be 55 db          	movsbl -0x25(%ebp),%edx
  1030bf:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1030c2:	89 54 24 18          	mov    %edx,0x18(%esp)
  1030c6:	8b 55 e8             	mov    -0x18(%ebp),%edx
  1030c9:	89 54 24 14          	mov    %edx,0x14(%esp)
  1030cd:	89 44 24 10          	mov    %eax,0x10(%esp)
  1030d1:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1030d4:	8b 55 f4             	mov    -0xc(%ebp),%edx
  1030d7:	89 44 24 08          	mov    %eax,0x8(%esp)
  1030db:	89 54 24 0c          	mov    %edx,0xc(%esp)
  1030df:	8b 45 0c             	mov    0xc(%ebp),%eax
  1030e2:	89 44 24 04          	mov    %eax,0x4(%esp)
  1030e6:	8b 45 08             	mov    0x8(%ebp),%eax
  1030e9:	89 04 24             	mov    %eax,(%esp)
  1030ec:	e8 a5 fa ff ff       	call   102b96 <printnum>
            break;
  1030f1:	eb 38                	jmp    10312b <vprintfmt+0x3cc>

        // escaped '%' character
        case '%':
            putch(ch, putdat);
  1030f3:	8b 45 0c             	mov    0xc(%ebp),%eax
  1030f6:	89 44 24 04          	mov    %eax,0x4(%esp)
  1030fa:	89 1c 24             	mov    %ebx,(%esp)
  1030fd:	8b 45 08             	mov    0x8(%ebp),%eax
  103100:	ff d0                	call   *%eax
            break;
  103102:	eb 27                	jmp    10312b <vprintfmt+0x3cc>

        // unrecognized escape sequence - just print it literally
        default:
            putch('%', putdat);
  103104:	8b 45 0c             	mov    0xc(%ebp),%eax
  103107:	89 44 24 04          	mov    %eax,0x4(%esp)
  10310b:	c7 04 24 25 00 00 00 	movl   $0x25,(%esp)
  103112:	8b 45 08             	mov    0x8(%ebp),%eax
  103115:	ff d0                	call   *%eax
            for (fmt --; fmt[-1] != '%'; fmt --)
  103117:	ff 4d 10             	decl   0x10(%ebp)
  10311a:	eb 03                	jmp    10311f <vprintfmt+0x3c0>
  10311c:	ff 4d 10             	decl   0x10(%ebp)
  10311f:	8b 45 10             	mov    0x10(%ebp),%eax
  103122:	48                   	dec    %eax
  103123:	0f b6 00             	movzbl (%eax),%eax
  103126:	3c 25                	cmp    $0x25,%al
  103128:	75 f2                	jne    10311c <vprintfmt+0x3bd>
                /* do nothing */;
            break;
  10312a:	90                   	nop
    while (1) {
  10312b:	e9 37 fc ff ff       	jmp    102d67 <vprintfmt+0x8>
                return;
  103130:	90                   	nop
        }
    }
}
  103131:	83 c4 40             	add    $0x40,%esp
  103134:	5b                   	pop    %ebx
  103135:	5e                   	pop    %esi
  103136:	5d                   	pop    %ebp
  103137:	c3                   	ret    

00103138 <sprintputch>:
 * sprintputch - 'print' a single character in a buffer
 * @ch:            the character will be printed
 * @b:            the buffer to place the character @ch
 * */
static void
sprintputch(int ch, struct sprintbuf *b) {
  103138:	55                   	push   %ebp
  103139:	89 e5                	mov    %esp,%ebp
    b->cnt ++;
  10313b:	8b 45 0c             	mov    0xc(%ebp),%eax
  10313e:	8b 40 08             	mov    0x8(%eax),%eax
  103141:	8d 50 01             	lea    0x1(%eax),%edx
  103144:	8b 45 0c             	mov    0xc(%ebp),%eax
  103147:	89 50 08             	mov    %edx,0x8(%eax)
    if (b->buf < b->ebuf) {
  10314a:	8b 45 0c             	mov    0xc(%ebp),%eax
  10314d:	8b 10                	mov    (%eax),%edx
  10314f:	8b 45 0c             	mov    0xc(%ebp),%eax
  103152:	8b 40 04             	mov    0x4(%eax),%eax
  103155:	39 c2                	cmp    %eax,%edx
  103157:	73 12                	jae    10316b <sprintputch+0x33>
        *b->buf ++ = ch;
  103159:	8b 45 0c             	mov    0xc(%ebp),%eax
  10315c:	8b 00                	mov    (%eax),%eax
  10315e:	8d 48 01             	lea    0x1(%eax),%ecx
  103161:	8b 55 0c             	mov    0xc(%ebp),%edx
  103164:	89 0a                	mov    %ecx,(%edx)
  103166:	8b 55 08             	mov    0x8(%ebp),%edx
  103169:	88 10                	mov    %dl,(%eax)
    }
}
  10316b:	90                   	nop
  10316c:	5d                   	pop    %ebp
  10316d:	c3                   	ret    

0010316e <snprintf>:
 * @str:        the buffer to place the result into
 * @size:        the size of buffer, including the trailing null space
 * @fmt:        the format string to use
 * */
int
snprintf(char *str, size_t size, const char *fmt, ...) {
  10316e:	55                   	push   %ebp
  10316f:	89 e5                	mov    %esp,%ebp
  103171:	83 ec 28             	sub    $0x28,%esp
    va_list ap;
    int cnt;
    va_start(ap, fmt);
  103174:	8d 45 14             	lea    0x14(%ebp),%eax
  103177:	89 45 f0             	mov    %eax,-0x10(%ebp)
    cnt = vsnprintf(str, size, fmt, ap);
  10317a:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10317d:	89 44 24 0c          	mov    %eax,0xc(%esp)
  103181:	8b 45 10             	mov    0x10(%ebp),%eax
  103184:	89 44 24 08          	mov    %eax,0x8(%esp)
  103188:	8b 45 0c             	mov    0xc(%ebp),%eax
  10318b:	89 44 24 04          	mov    %eax,0x4(%esp)
  10318f:	8b 45 08             	mov    0x8(%ebp),%eax
  103192:	89 04 24             	mov    %eax,(%esp)
  103195:	e8 0a 00 00 00       	call   1031a4 <vsnprintf>
  10319a:	89 45 f4             	mov    %eax,-0xc(%ebp)
    va_end(ap);
    return cnt;
  10319d:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  1031a0:	89 ec                	mov    %ebp,%esp
  1031a2:	5d                   	pop    %ebp
  1031a3:	c3                   	ret    

001031a4 <vsnprintf>:
 *
 * Call this function if you are already dealing with a va_list.
 * Or you probably want snprintf() instead.
 * */
int
vsnprintf(char *str, size_t size, const char *fmt, va_list ap) {
  1031a4:	55                   	push   %ebp
  1031a5:	89 e5                	mov    %esp,%ebp
  1031a7:	83 ec 28             	sub    $0x28,%esp
    struct sprintbuf b = {str, str + size - 1, 0};
  1031aa:	8b 45 08             	mov    0x8(%ebp),%eax
  1031ad:	89 45 ec             	mov    %eax,-0x14(%ebp)
  1031b0:	8b 45 0c             	mov    0xc(%ebp),%eax
  1031b3:	8d 50 ff             	lea    -0x1(%eax),%edx
  1031b6:	8b 45 08             	mov    0x8(%ebp),%eax
  1031b9:	01 d0                	add    %edx,%eax
  1031bb:	89 45 f0             	mov    %eax,-0x10(%ebp)
  1031be:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    if (str == NULL || b.buf > b.ebuf) {
  1031c5:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
  1031c9:	74 0a                	je     1031d5 <vsnprintf+0x31>
  1031cb:	8b 55 ec             	mov    -0x14(%ebp),%edx
  1031ce:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1031d1:	39 c2                	cmp    %eax,%edx
  1031d3:	76 07                	jbe    1031dc <vsnprintf+0x38>
        return -E_INVAL;
  1031d5:	b8 fd ff ff ff       	mov    $0xfffffffd,%eax
  1031da:	eb 2a                	jmp    103206 <vsnprintf+0x62>
    }
    // print the string to the buffer
    vprintfmt((void*)sprintputch, &b, fmt, ap);
  1031dc:	8b 45 14             	mov    0x14(%ebp),%eax
  1031df:	89 44 24 0c          	mov    %eax,0xc(%esp)
  1031e3:	8b 45 10             	mov    0x10(%ebp),%eax
  1031e6:	89 44 24 08          	mov    %eax,0x8(%esp)
  1031ea:	8d 45 ec             	lea    -0x14(%ebp),%eax
  1031ed:	89 44 24 04          	mov    %eax,0x4(%esp)
  1031f1:	c7 04 24 38 31 10 00 	movl   $0x103138,(%esp)
  1031f8:	e8 62 fb ff ff       	call   102d5f <vprintfmt>
    // null terminate the buffer
    *b.buf = '\0';
  1031fd:	8b 45 ec             	mov    -0x14(%ebp),%eax
  103200:	c6 00 00             	movb   $0x0,(%eax)
    return b.cnt;
  103203:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  103206:	89 ec                	mov    %ebp,%esp
  103208:	5d                   	pop    %ebp
  103209:	c3                   	ret    

0010320a <strlen>:
 * @s:        the input string
 *
 * The strlen() function returns the length of string @s.
 * */
size_t
strlen(const char *s) {
  10320a:	55                   	push   %ebp
  10320b:	89 e5                	mov    %esp,%ebp
  10320d:	83 ec 10             	sub    $0x10,%esp
    size_t cnt = 0;
  103210:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
    while (*s ++ != '\0') {
  103217:	eb 03                	jmp    10321c <strlen+0x12>
        cnt ++;
  103219:	ff 45 fc             	incl   -0x4(%ebp)
    while (*s ++ != '\0') {
  10321c:	8b 45 08             	mov    0x8(%ebp),%eax
  10321f:	8d 50 01             	lea    0x1(%eax),%edx
  103222:	89 55 08             	mov    %edx,0x8(%ebp)
  103225:	0f b6 00             	movzbl (%eax),%eax
  103228:	84 c0                	test   %al,%al
  10322a:	75 ed                	jne    103219 <strlen+0xf>
    }
    return cnt;
  10322c:	8b 45 fc             	mov    -0x4(%ebp),%eax
}
  10322f:	89 ec                	mov    %ebp,%esp
  103231:	5d                   	pop    %ebp
  103232:	c3                   	ret    

00103233 <strnlen>:
 * The return value is strlen(s), if that is less than @len, or
 * @len if there is no '\0' character among the first @len characters
 * pointed by @s.
 * */
size_t
strnlen(const char *s, size_t len) {
  103233:	55                   	push   %ebp
  103234:	89 e5                	mov    %esp,%ebp
  103236:	83 ec 10             	sub    $0x10,%esp
    size_t cnt = 0;
  103239:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
    while (cnt < len && *s ++ != '\0') {
  103240:	eb 03                	jmp    103245 <strnlen+0x12>
        cnt ++;
  103242:	ff 45 fc             	incl   -0x4(%ebp)
    while (cnt < len && *s ++ != '\0') {
  103245:	8b 45 fc             	mov    -0x4(%ebp),%eax
  103248:	3b 45 0c             	cmp    0xc(%ebp),%eax
  10324b:	73 10                	jae    10325d <strnlen+0x2a>
  10324d:	8b 45 08             	mov    0x8(%ebp),%eax
  103250:	8d 50 01             	lea    0x1(%eax),%edx
  103253:	89 55 08             	mov    %edx,0x8(%ebp)
  103256:	0f b6 00             	movzbl (%eax),%eax
  103259:	84 c0                	test   %al,%al
  10325b:	75 e5                	jne    103242 <strnlen+0xf>
    }
    return cnt;
  10325d:	8b 45 fc             	mov    -0x4(%ebp),%eax
}
  103260:	89 ec                	mov    %ebp,%esp
  103262:	5d                   	pop    %ebp
  103263:	c3                   	ret    

00103264 <strcpy>:
 * To avoid overflows, the size of array pointed by @dst should be long enough to
 * contain the same string as @src (including the terminating null character), and
 * should not overlap in memory with @src.
 * */
char *
strcpy(char *dst, const char *src) {
  103264:	55                   	push   %ebp
  103265:	89 e5                	mov    %esp,%ebp
  103267:	57                   	push   %edi
  103268:	56                   	push   %esi
  103269:	83 ec 20             	sub    $0x20,%esp
  10326c:	8b 45 08             	mov    0x8(%ebp),%eax
  10326f:	89 45 f4             	mov    %eax,-0xc(%ebp)
  103272:	8b 45 0c             	mov    0xc(%ebp),%eax
  103275:	89 45 f0             	mov    %eax,-0x10(%ebp)
#ifndef __HAVE_ARCH_STRCPY
#define __HAVE_ARCH_STRCPY
static inline char *
__strcpy(char *dst, const char *src) {
    int d0, d1, d2;
    asm volatile (
  103278:	8b 55 f0             	mov    -0x10(%ebp),%edx
  10327b:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10327e:	89 d1                	mov    %edx,%ecx
  103280:	89 c2                	mov    %eax,%edx
  103282:	89 ce                	mov    %ecx,%esi
  103284:	89 d7                	mov    %edx,%edi
  103286:	ac                   	lods   %ds:(%esi),%al
  103287:	aa                   	stos   %al,%es:(%edi)
  103288:	84 c0                	test   %al,%al
  10328a:	75 fa                	jne    103286 <strcpy+0x22>
  10328c:	89 fa                	mov    %edi,%edx
  10328e:	89 f1                	mov    %esi,%ecx
  103290:	89 4d ec             	mov    %ecx,-0x14(%ebp)
  103293:	89 55 e8             	mov    %edx,-0x18(%ebp)
  103296:	89 45 e4             	mov    %eax,-0x1c(%ebp)
            "stosb;"
            "testb %%al, %%al;"
            "jne 1b;"
            : "=&S" (d0), "=&D" (d1), "=&a" (d2)
            : "0" (src), "1" (dst) : "memory");
    return dst;
  103299:	8b 45 f4             	mov    -0xc(%ebp),%eax
    char *p = dst;
    while ((*p ++ = *src ++) != '\0')
        /* nothing */;
    return dst;
#endif /* __HAVE_ARCH_STRCPY */
}
  10329c:	83 c4 20             	add    $0x20,%esp
  10329f:	5e                   	pop    %esi
  1032a0:	5f                   	pop    %edi
  1032a1:	5d                   	pop    %ebp
  1032a2:	c3                   	ret    

001032a3 <strncpy>:
 * @len:    maximum number of characters to be copied from @src
 *
 * The return value is @dst
 * */
char *
strncpy(char *dst, const char *src, size_t len) {
  1032a3:	55                   	push   %ebp
  1032a4:	89 e5                	mov    %esp,%ebp
  1032a6:	83 ec 10             	sub    $0x10,%esp
    char *p = dst;
  1032a9:	8b 45 08             	mov    0x8(%ebp),%eax
  1032ac:	89 45 fc             	mov    %eax,-0x4(%ebp)
    while (len > 0) {
  1032af:	eb 1e                	jmp    1032cf <strncpy+0x2c>
        if ((*p = *src) != '\0') {
  1032b1:	8b 45 0c             	mov    0xc(%ebp),%eax
  1032b4:	0f b6 10             	movzbl (%eax),%edx
  1032b7:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1032ba:	88 10                	mov    %dl,(%eax)
  1032bc:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1032bf:	0f b6 00             	movzbl (%eax),%eax
  1032c2:	84 c0                	test   %al,%al
  1032c4:	74 03                	je     1032c9 <strncpy+0x26>
            src ++;
  1032c6:	ff 45 0c             	incl   0xc(%ebp)
        }
        p ++, len --;
  1032c9:	ff 45 fc             	incl   -0x4(%ebp)
  1032cc:	ff 4d 10             	decl   0x10(%ebp)
    while (len > 0) {
  1032cf:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  1032d3:	75 dc                	jne    1032b1 <strncpy+0xe>
    }
    return dst;
  1032d5:	8b 45 08             	mov    0x8(%ebp),%eax
}
  1032d8:	89 ec                	mov    %ebp,%esp
  1032da:	5d                   	pop    %ebp
  1032db:	c3                   	ret    

001032dc <strcmp>:
 * - A value greater than zero indicates that the first character that does
 *   not match has a greater value in @s1 than in @s2;
 * - And a value less than zero indicates the opposite.
 * */
int
strcmp(const char *s1, const char *s2) {
  1032dc:	55                   	push   %ebp
  1032dd:	89 e5                	mov    %esp,%ebp
  1032df:	57                   	push   %edi
  1032e0:	56                   	push   %esi
  1032e1:	83 ec 20             	sub    $0x20,%esp
  1032e4:	8b 45 08             	mov    0x8(%ebp),%eax
  1032e7:	89 45 f4             	mov    %eax,-0xc(%ebp)
  1032ea:	8b 45 0c             	mov    0xc(%ebp),%eax
  1032ed:	89 45 f0             	mov    %eax,-0x10(%ebp)
    asm volatile (
  1032f0:	8b 55 f4             	mov    -0xc(%ebp),%edx
  1032f3:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1032f6:	89 d1                	mov    %edx,%ecx
  1032f8:	89 c2                	mov    %eax,%edx
  1032fa:	89 ce                	mov    %ecx,%esi
  1032fc:	89 d7                	mov    %edx,%edi
  1032fe:	ac                   	lods   %ds:(%esi),%al
  1032ff:	ae                   	scas   %es:(%edi),%al
  103300:	75 08                	jne    10330a <strcmp+0x2e>
  103302:	84 c0                	test   %al,%al
  103304:	75 f8                	jne    1032fe <strcmp+0x22>
  103306:	31 c0                	xor    %eax,%eax
  103308:	eb 04                	jmp    10330e <strcmp+0x32>
  10330a:	19 c0                	sbb    %eax,%eax
  10330c:	0c 01                	or     $0x1,%al
  10330e:	89 fa                	mov    %edi,%edx
  103310:	89 f1                	mov    %esi,%ecx
  103312:	89 45 ec             	mov    %eax,-0x14(%ebp)
  103315:	89 4d e8             	mov    %ecx,-0x18(%ebp)
  103318:	89 55 e4             	mov    %edx,-0x1c(%ebp)
    return ret;
  10331b:	8b 45 ec             	mov    -0x14(%ebp),%eax
    while (*s1 != '\0' && *s1 == *s2) {
        s1 ++, s2 ++;
    }
    return (int)((unsigned char)*s1 - (unsigned char)*s2);
#endif /* __HAVE_ARCH_STRCMP */
}
  10331e:	83 c4 20             	add    $0x20,%esp
  103321:	5e                   	pop    %esi
  103322:	5f                   	pop    %edi
  103323:	5d                   	pop    %ebp
  103324:	c3                   	ret    

00103325 <strncmp>:
 * they are equal to each other, it continues with the following pairs until
 * the characters differ, until a terminating null-character is reached, or
 * until @n characters match in both strings, whichever happens first.
 * */
int
strncmp(const char *s1, const char *s2, size_t n) {
  103325:	55                   	push   %ebp
  103326:	89 e5                	mov    %esp,%ebp
    while (n > 0 && *s1 != '\0' && *s1 == *s2) {
  103328:	eb 09                	jmp    103333 <strncmp+0xe>
        n --, s1 ++, s2 ++;
  10332a:	ff 4d 10             	decl   0x10(%ebp)
  10332d:	ff 45 08             	incl   0x8(%ebp)
  103330:	ff 45 0c             	incl   0xc(%ebp)
    while (n > 0 && *s1 != '\0' && *s1 == *s2) {
  103333:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  103337:	74 1a                	je     103353 <strncmp+0x2e>
  103339:	8b 45 08             	mov    0x8(%ebp),%eax
  10333c:	0f b6 00             	movzbl (%eax),%eax
  10333f:	84 c0                	test   %al,%al
  103341:	74 10                	je     103353 <strncmp+0x2e>
  103343:	8b 45 08             	mov    0x8(%ebp),%eax
  103346:	0f b6 10             	movzbl (%eax),%edx
  103349:	8b 45 0c             	mov    0xc(%ebp),%eax
  10334c:	0f b6 00             	movzbl (%eax),%eax
  10334f:	38 c2                	cmp    %al,%dl
  103351:	74 d7                	je     10332a <strncmp+0x5>
    }
    return (n == 0) ? 0 : (int)((unsigned char)*s1 - (unsigned char)*s2);
  103353:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  103357:	74 18                	je     103371 <strncmp+0x4c>
  103359:	8b 45 08             	mov    0x8(%ebp),%eax
  10335c:	0f b6 00             	movzbl (%eax),%eax
  10335f:	0f b6 d0             	movzbl %al,%edx
  103362:	8b 45 0c             	mov    0xc(%ebp),%eax
  103365:	0f b6 00             	movzbl (%eax),%eax
  103368:	0f b6 c8             	movzbl %al,%ecx
  10336b:	89 d0                	mov    %edx,%eax
  10336d:	29 c8                	sub    %ecx,%eax
  10336f:	eb 05                	jmp    103376 <strncmp+0x51>
  103371:	b8 00 00 00 00       	mov    $0x0,%eax
}
  103376:	5d                   	pop    %ebp
  103377:	c3                   	ret    

00103378 <strchr>:
 *
 * The strchr() function returns a pointer to the first occurrence of
 * character in @s. If the value is not found, the function returns 'NULL'.
 * */
char *
strchr(const char *s, char c) {
  103378:	55                   	push   %ebp
  103379:	89 e5                	mov    %esp,%ebp
  10337b:	83 ec 04             	sub    $0x4,%esp
  10337e:	8b 45 0c             	mov    0xc(%ebp),%eax
  103381:	88 45 fc             	mov    %al,-0x4(%ebp)
    while (*s != '\0') {
  103384:	eb 13                	jmp    103399 <strchr+0x21>
        if (*s == c) {
  103386:	8b 45 08             	mov    0x8(%ebp),%eax
  103389:	0f b6 00             	movzbl (%eax),%eax
  10338c:	38 45 fc             	cmp    %al,-0x4(%ebp)
  10338f:	75 05                	jne    103396 <strchr+0x1e>
            return (char *)s;
  103391:	8b 45 08             	mov    0x8(%ebp),%eax
  103394:	eb 12                	jmp    1033a8 <strchr+0x30>
        }
        s ++;
  103396:	ff 45 08             	incl   0x8(%ebp)
    while (*s != '\0') {
  103399:	8b 45 08             	mov    0x8(%ebp),%eax
  10339c:	0f b6 00             	movzbl (%eax),%eax
  10339f:	84 c0                	test   %al,%al
  1033a1:	75 e3                	jne    103386 <strchr+0xe>
    }
    return NULL;
  1033a3:	b8 00 00 00 00       	mov    $0x0,%eax
}
  1033a8:	89 ec                	mov    %ebp,%esp
  1033aa:	5d                   	pop    %ebp
  1033ab:	c3                   	ret    

001033ac <strfind>:
 * The strfind() function is like strchr() except that if @c is
 * not found in @s, then it returns a pointer to the null byte at the
 * end of @s, rather than 'NULL'.
 * */
char *
strfind(const char *s, char c) {
  1033ac:	55                   	push   %ebp
  1033ad:	89 e5                	mov    %esp,%ebp
  1033af:	83 ec 04             	sub    $0x4,%esp
  1033b2:	8b 45 0c             	mov    0xc(%ebp),%eax
  1033b5:	88 45 fc             	mov    %al,-0x4(%ebp)
    while (*s != '\0') {
  1033b8:	eb 0e                	jmp    1033c8 <strfind+0x1c>
        if (*s == c) {
  1033ba:	8b 45 08             	mov    0x8(%ebp),%eax
  1033bd:	0f b6 00             	movzbl (%eax),%eax
  1033c0:	38 45 fc             	cmp    %al,-0x4(%ebp)
  1033c3:	74 0f                	je     1033d4 <strfind+0x28>
            break;
        }
        s ++;
  1033c5:	ff 45 08             	incl   0x8(%ebp)
    while (*s != '\0') {
  1033c8:	8b 45 08             	mov    0x8(%ebp),%eax
  1033cb:	0f b6 00             	movzbl (%eax),%eax
  1033ce:	84 c0                	test   %al,%al
  1033d0:	75 e8                	jne    1033ba <strfind+0xe>
  1033d2:	eb 01                	jmp    1033d5 <strfind+0x29>
            break;
  1033d4:	90                   	nop
    }
    return (char *)s;
  1033d5:	8b 45 08             	mov    0x8(%ebp),%eax
}
  1033d8:	89 ec                	mov    %ebp,%esp
  1033da:	5d                   	pop    %ebp
  1033db:	c3                   	ret    

001033dc <strtol>:
 * an optional "0x" or "0X" prefix.
 *
 * The strtol() function returns the converted integral number as a long int value.
 * */
long
strtol(const char *s, char **endptr, int base) {
  1033dc:	55                   	push   %ebp
  1033dd:	89 e5                	mov    %esp,%ebp
  1033df:	83 ec 10             	sub    $0x10,%esp
    int neg = 0;
  1033e2:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
    long val = 0;
  1033e9:	c7 45 f8 00 00 00 00 	movl   $0x0,-0x8(%ebp)

    // gobble initial whitespace
    while (*s == ' ' || *s == '\t') {
  1033f0:	eb 03                	jmp    1033f5 <strtol+0x19>
        s ++;
  1033f2:	ff 45 08             	incl   0x8(%ebp)
    while (*s == ' ' || *s == '\t') {
  1033f5:	8b 45 08             	mov    0x8(%ebp),%eax
  1033f8:	0f b6 00             	movzbl (%eax),%eax
  1033fb:	3c 20                	cmp    $0x20,%al
  1033fd:	74 f3                	je     1033f2 <strtol+0x16>
  1033ff:	8b 45 08             	mov    0x8(%ebp),%eax
  103402:	0f b6 00             	movzbl (%eax),%eax
  103405:	3c 09                	cmp    $0x9,%al
  103407:	74 e9                	je     1033f2 <strtol+0x16>
    }

    // plus/minus sign
    if (*s == '+') {
  103409:	8b 45 08             	mov    0x8(%ebp),%eax
  10340c:	0f b6 00             	movzbl (%eax),%eax
  10340f:	3c 2b                	cmp    $0x2b,%al
  103411:	75 05                	jne    103418 <strtol+0x3c>
        s ++;
  103413:	ff 45 08             	incl   0x8(%ebp)
  103416:	eb 14                	jmp    10342c <strtol+0x50>
    }
    else if (*s == '-') {
  103418:	8b 45 08             	mov    0x8(%ebp),%eax
  10341b:	0f b6 00             	movzbl (%eax),%eax
  10341e:	3c 2d                	cmp    $0x2d,%al
  103420:	75 0a                	jne    10342c <strtol+0x50>
        s ++, neg = 1;
  103422:	ff 45 08             	incl   0x8(%ebp)
  103425:	c7 45 fc 01 00 00 00 	movl   $0x1,-0x4(%ebp)
    }

    // hex or octal base prefix
    if ((base == 0 || base == 16) && (s[0] == '0' && s[1] == 'x')) {
  10342c:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  103430:	74 06                	je     103438 <strtol+0x5c>
  103432:	83 7d 10 10          	cmpl   $0x10,0x10(%ebp)
  103436:	75 22                	jne    10345a <strtol+0x7e>
  103438:	8b 45 08             	mov    0x8(%ebp),%eax
  10343b:	0f b6 00             	movzbl (%eax),%eax
  10343e:	3c 30                	cmp    $0x30,%al
  103440:	75 18                	jne    10345a <strtol+0x7e>
  103442:	8b 45 08             	mov    0x8(%ebp),%eax
  103445:	40                   	inc    %eax
  103446:	0f b6 00             	movzbl (%eax),%eax
  103449:	3c 78                	cmp    $0x78,%al
  10344b:	75 0d                	jne    10345a <strtol+0x7e>
        s += 2, base = 16;
  10344d:	83 45 08 02          	addl   $0x2,0x8(%ebp)
  103451:	c7 45 10 10 00 00 00 	movl   $0x10,0x10(%ebp)
  103458:	eb 29                	jmp    103483 <strtol+0xa7>
    }
    else if (base == 0 && s[0] == '0') {
  10345a:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  10345e:	75 16                	jne    103476 <strtol+0x9a>
  103460:	8b 45 08             	mov    0x8(%ebp),%eax
  103463:	0f b6 00             	movzbl (%eax),%eax
  103466:	3c 30                	cmp    $0x30,%al
  103468:	75 0c                	jne    103476 <strtol+0x9a>
        s ++, base = 8;
  10346a:	ff 45 08             	incl   0x8(%ebp)
  10346d:	c7 45 10 08 00 00 00 	movl   $0x8,0x10(%ebp)
  103474:	eb 0d                	jmp    103483 <strtol+0xa7>
    }
    else if (base == 0) {
  103476:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  10347a:	75 07                	jne    103483 <strtol+0xa7>
        base = 10;
  10347c:	c7 45 10 0a 00 00 00 	movl   $0xa,0x10(%ebp)

    // digits
    while (1) {
        int dig;

        if (*s >= '0' && *s <= '9') {
  103483:	8b 45 08             	mov    0x8(%ebp),%eax
  103486:	0f b6 00             	movzbl (%eax),%eax
  103489:	3c 2f                	cmp    $0x2f,%al
  10348b:	7e 1b                	jle    1034a8 <strtol+0xcc>
  10348d:	8b 45 08             	mov    0x8(%ebp),%eax
  103490:	0f b6 00             	movzbl (%eax),%eax
  103493:	3c 39                	cmp    $0x39,%al
  103495:	7f 11                	jg     1034a8 <strtol+0xcc>
            dig = *s - '0';
  103497:	8b 45 08             	mov    0x8(%ebp),%eax
  10349a:	0f b6 00             	movzbl (%eax),%eax
  10349d:	0f be c0             	movsbl %al,%eax
  1034a0:	83 e8 30             	sub    $0x30,%eax
  1034a3:	89 45 f4             	mov    %eax,-0xc(%ebp)
  1034a6:	eb 48                	jmp    1034f0 <strtol+0x114>
        }
        else if (*s >= 'a' && *s <= 'z') {
  1034a8:	8b 45 08             	mov    0x8(%ebp),%eax
  1034ab:	0f b6 00             	movzbl (%eax),%eax
  1034ae:	3c 60                	cmp    $0x60,%al
  1034b0:	7e 1b                	jle    1034cd <strtol+0xf1>
  1034b2:	8b 45 08             	mov    0x8(%ebp),%eax
  1034b5:	0f b6 00             	movzbl (%eax),%eax
  1034b8:	3c 7a                	cmp    $0x7a,%al
  1034ba:	7f 11                	jg     1034cd <strtol+0xf1>
            dig = *s - 'a' + 10;
  1034bc:	8b 45 08             	mov    0x8(%ebp),%eax
  1034bf:	0f b6 00             	movzbl (%eax),%eax
  1034c2:	0f be c0             	movsbl %al,%eax
  1034c5:	83 e8 57             	sub    $0x57,%eax
  1034c8:	89 45 f4             	mov    %eax,-0xc(%ebp)
  1034cb:	eb 23                	jmp    1034f0 <strtol+0x114>
        }
        else if (*s >= 'A' && *s <= 'Z') {
  1034cd:	8b 45 08             	mov    0x8(%ebp),%eax
  1034d0:	0f b6 00             	movzbl (%eax),%eax
  1034d3:	3c 40                	cmp    $0x40,%al
  1034d5:	7e 3b                	jle    103512 <strtol+0x136>
  1034d7:	8b 45 08             	mov    0x8(%ebp),%eax
  1034da:	0f b6 00             	movzbl (%eax),%eax
  1034dd:	3c 5a                	cmp    $0x5a,%al
  1034df:	7f 31                	jg     103512 <strtol+0x136>
            dig = *s - 'A' + 10;
  1034e1:	8b 45 08             	mov    0x8(%ebp),%eax
  1034e4:	0f b6 00             	movzbl (%eax),%eax
  1034e7:	0f be c0             	movsbl %al,%eax
  1034ea:	83 e8 37             	sub    $0x37,%eax
  1034ed:	89 45 f4             	mov    %eax,-0xc(%ebp)
        }
        else {
            break;
        }
        if (dig >= base) {
  1034f0:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1034f3:	3b 45 10             	cmp    0x10(%ebp),%eax
  1034f6:	7d 19                	jge    103511 <strtol+0x135>
            break;
        }
        s ++, val = (val * base) + dig;
  1034f8:	ff 45 08             	incl   0x8(%ebp)
  1034fb:	8b 45 f8             	mov    -0x8(%ebp),%eax
  1034fe:	0f af 45 10          	imul   0x10(%ebp),%eax
  103502:	89 c2                	mov    %eax,%edx
  103504:	8b 45 f4             	mov    -0xc(%ebp),%eax
  103507:	01 d0                	add    %edx,%eax
  103509:	89 45 f8             	mov    %eax,-0x8(%ebp)
    while (1) {
  10350c:	e9 72 ff ff ff       	jmp    103483 <strtol+0xa7>
            break;
  103511:	90                   	nop
        // we don't properly detect overflow!
    }

    if (endptr) {
  103512:	83 7d 0c 00          	cmpl   $0x0,0xc(%ebp)
  103516:	74 08                	je     103520 <strtol+0x144>
        *endptr = (char *) s;
  103518:	8b 45 0c             	mov    0xc(%ebp),%eax
  10351b:	8b 55 08             	mov    0x8(%ebp),%edx
  10351e:	89 10                	mov    %edx,(%eax)
    }
    return (neg ? -val : val);
  103520:	83 7d fc 00          	cmpl   $0x0,-0x4(%ebp)
  103524:	74 07                	je     10352d <strtol+0x151>
  103526:	8b 45 f8             	mov    -0x8(%ebp),%eax
  103529:	f7 d8                	neg    %eax
  10352b:	eb 03                	jmp    103530 <strtol+0x154>
  10352d:	8b 45 f8             	mov    -0x8(%ebp),%eax
}
  103530:	89 ec                	mov    %ebp,%esp
  103532:	5d                   	pop    %ebp
  103533:	c3                   	ret    

00103534 <memset>:
 * @n:        number of bytes to be set to the value
 *
 * The memset() function returns @s.
 * */
void *
memset(void *s, char c, size_t n) {
  103534:	55                   	push   %ebp
  103535:	89 e5                	mov    %esp,%ebp
  103537:	83 ec 28             	sub    $0x28,%esp
  10353a:	89 7d fc             	mov    %edi,-0x4(%ebp)
  10353d:	8b 45 0c             	mov    0xc(%ebp),%eax
  103540:	88 45 d8             	mov    %al,-0x28(%ebp)
#ifdef __HAVE_ARCH_MEMSET
    return __memset(s, c, n);
  103543:	0f be 55 d8          	movsbl -0x28(%ebp),%edx
  103547:	8b 45 08             	mov    0x8(%ebp),%eax
  10354a:	89 45 f8             	mov    %eax,-0x8(%ebp)
  10354d:	88 55 f7             	mov    %dl,-0x9(%ebp)
  103550:	8b 45 10             	mov    0x10(%ebp),%eax
  103553:	89 45 f0             	mov    %eax,-0x10(%ebp)
#ifndef __HAVE_ARCH_MEMSET
#define __HAVE_ARCH_MEMSET
static inline void *
__memset(void *s, char c, size_t n) {
    int d0, d1;
    asm volatile (
  103556:	8b 4d f0             	mov    -0x10(%ebp),%ecx
  103559:	0f b6 45 f7          	movzbl -0x9(%ebp),%eax
  10355d:	8b 55 f8             	mov    -0x8(%ebp),%edx
  103560:	89 d7                	mov    %edx,%edi
  103562:	f3 aa                	rep stos %al,%es:(%edi)
  103564:	89 fa                	mov    %edi,%edx
  103566:	89 4d ec             	mov    %ecx,-0x14(%ebp)
  103569:	89 55 e8             	mov    %edx,-0x18(%ebp)
            "rep; stosb;"
            : "=&c" (d0), "=&D" (d1)
            : "0" (n), "a" (c), "1" (s)
            : "memory");
    return s;
  10356c:	8b 45 f8             	mov    -0x8(%ebp),%eax
    while (n -- > 0) {
        *p ++ = c;
    }
    return s;
#endif /* __HAVE_ARCH_MEMSET */
}
  10356f:	8b 7d fc             	mov    -0x4(%ebp),%edi
  103572:	89 ec                	mov    %ebp,%esp
  103574:	5d                   	pop    %ebp
  103575:	c3                   	ret    

00103576 <memmove>:
 * @n:        number of bytes to copy
 *
 * The memmove() function returns @dst.
 * */
void *
memmove(void *dst, const void *src, size_t n) {
  103576:	55                   	push   %ebp
  103577:	89 e5                	mov    %esp,%ebp
  103579:	57                   	push   %edi
  10357a:	56                   	push   %esi
  10357b:	53                   	push   %ebx
  10357c:	83 ec 30             	sub    $0x30,%esp
  10357f:	8b 45 08             	mov    0x8(%ebp),%eax
  103582:	89 45 f0             	mov    %eax,-0x10(%ebp)
  103585:	8b 45 0c             	mov    0xc(%ebp),%eax
  103588:	89 45 ec             	mov    %eax,-0x14(%ebp)
  10358b:	8b 45 10             	mov    0x10(%ebp),%eax
  10358e:	89 45 e8             	mov    %eax,-0x18(%ebp)

#ifndef __HAVE_ARCH_MEMMOVE
#define __HAVE_ARCH_MEMMOVE
static inline void *
__memmove(void *dst, const void *src, size_t n) {
    if (dst < src) {
  103591:	8b 45 f0             	mov    -0x10(%ebp),%eax
  103594:	3b 45 ec             	cmp    -0x14(%ebp),%eax
  103597:	73 42                	jae    1035db <memmove+0x65>
  103599:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10359c:	89 45 e4             	mov    %eax,-0x1c(%ebp)
  10359f:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1035a2:	89 45 e0             	mov    %eax,-0x20(%ebp)
  1035a5:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1035a8:	89 45 dc             	mov    %eax,-0x24(%ebp)
            "andl $3, %%ecx;"
            "jz 1f;"
            "rep; movsb;"
            "1:"
            : "=&c" (d0), "=&D" (d1), "=&S" (d2)
            : "0" (n / 4), "g" (n), "1" (dst), "2" (src)
  1035ab:	8b 45 dc             	mov    -0x24(%ebp),%eax
  1035ae:	c1 e8 02             	shr    $0x2,%eax
  1035b1:	89 c1                	mov    %eax,%ecx
    asm volatile (
  1035b3:	8b 55 e4             	mov    -0x1c(%ebp),%edx
  1035b6:	8b 45 e0             	mov    -0x20(%ebp),%eax
  1035b9:	89 d7                	mov    %edx,%edi
  1035bb:	89 c6                	mov    %eax,%esi
  1035bd:	f3 a5                	rep movsl %ds:(%esi),%es:(%edi)
  1035bf:	8b 4d dc             	mov    -0x24(%ebp),%ecx
  1035c2:	83 e1 03             	and    $0x3,%ecx
  1035c5:	74 02                	je     1035c9 <memmove+0x53>
  1035c7:	f3 a4                	rep movsb %ds:(%esi),%es:(%edi)
  1035c9:	89 f0                	mov    %esi,%eax
  1035cb:	89 fa                	mov    %edi,%edx
  1035cd:	89 4d d8             	mov    %ecx,-0x28(%ebp)
  1035d0:	89 55 d4             	mov    %edx,-0x2c(%ebp)
  1035d3:	89 45 d0             	mov    %eax,-0x30(%ebp)
            : "memory");
    return dst;
  1035d6:	8b 45 e4             	mov    -0x1c(%ebp),%eax
        return __memcpy(dst, src, n);
  1035d9:	eb 36                	jmp    103611 <memmove+0x9b>
            : "0" (n), "1" (n - 1 + src), "2" (n - 1 + dst)
  1035db:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1035de:	8d 50 ff             	lea    -0x1(%eax),%edx
  1035e1:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1035e4:	01 c2                	add    %eax,%edx
  1035e6:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1035e9:	8d 48 ff             	lea    -0x1(%eax),%ecx
  1035ec:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1035ef:	8d 1c 01             	lea    (%ecx,%eax,1),%ebx
    asm volatile (
  1035f2:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1035f5:	89 c1                	mov    %eax,%ecx
  1035f7:	89 d8                	mov    %ebx,%eax
  1035f9:	89 d6                	mov    %edx,%esi
  1035fb:	89 c7                	mov    %eax,%edi
  1035fd:	fd                   	std    
  1035fe:	f3 a4                	rep movsb %ds:(%esi),%es:(%edi)
  103600:	fc                   	cld    
  103601:	89 f8                	mov    %edi,%eax
  103603:	89 f2                	mov    %esi,%edx
  103605:	89 4d cc             	mov    %ecx,-0x34(%ebp)
  103608:	89 55 c8             	mov    %edx,-0x38(%ebp)
  10360b:	89 45 c4             	mov    %eax,-0x3c(%ebp)
    return dst;
  10360e:	8b 45 f0             	mov    -0x10(%ebp),%eax
            *d ++ = *s ++;
        }
    }
    return dst;
#endif /* __HAVE_ARCH_MEMMOVE */
}
  103611:	83 c4 30             	add    $0x30,%esp
  103614:	5b                   	pop    %ebx
  103615:	5e                   	pop    %esi
  103616:	5f                   	pop    %edi
  103617:	5d                   	pop    %ebp
  103618:	c3                   	ret    

00103619 <memcpy>:
 * it always copies exactly @n bytes. To avoid overflows, the size of arrays pointed
 * by both @src and @dst, should be at least @n bytes, and should not overlap
 * (for overlapping memory area, memmove is a safer approach).
 * */
void *
memcpy(void *dst, const void *src, size_t n) {
  103619:	55                   	push   %ebp
  10361a:	89 e5                	mov    %esp,%ebp
  10361c:	57                   	push   %edi
  10361d:	56                   	push   %esi
  10361e:	83 ec 20             	sub    $0x20,%esp
  103621:	8b 45 08             	mov    0x8(%ebp),%eax
  103624:	89 45 f4             	mov    %eax,-0xc(%ebp)
  103627:	8b 45 0c             	mov    0xc(%ebp),%eax
  10362a:	89 45 f0             	mov    %eax,-0x10(%ebp)
  10362d:	8b 45 10             	mov    0x10(%ebp),%eax
  103630:	89 45 ec             	mov    %eax,-0x14(%ebp)
            : "0" (n / 4), "g" (n), "1" (dst), "2" (src)
  103633:	8b 45 ec             	mov    -0x14(%ebp),%eax
  103636:	c1 e8 02             	shr    $0x2,%eax
  103639:	89 c1                	mov    %eax,%ecx
    asm volatile (
  10363b:	8b 55 f4             	mov    -0xc(%ebp),%edx
  10363e:	8b 45 f0             	mov    -0x10(%ebp),%eax
  103641:	89 d7                	mov    %edx,%edi
  103643:	89 c6                	mov    %eax,%esi
  103645:	f3 a5                	rep movsl %ds:(%esi),%es:(%edi)
  103647:	8b 4d ec             	mov    -0x14(%ebp),%ecx
  10364a:	83 e1 03             	and    $0x3,%ecx
  10364d:	74 02                	je     103651 <memcpy+0x38>
  10364f:	f3 a4                	rep movsb %ds:(%esi),%es:(%edi)
  103651:	89 f0                	mov    %esi,%eax
  103653:	89 fa                	mov    %edi,%edx
  103655:	89 4d e8             	mov    %ecx,-0x18(%ebp)
  103658:	89 55 e4             	mov    %edx,-0x1c(%ebp)
  10365b:	89 45 e0             	mov    %eax,-0x20(%ebp)
    return dst;
  10365e:	8b 45 f4             	mov    -0xc(%ebp),%eax
    while (n -- > 0) {
        *d ++ = *s ++;
    }
    return dst;
#endif /* __HAVE_ARCH_MEMCPY */
}
  103661:	83 c4 20             	add    $0x20,%esp
  103664:	5e                   	pop    %esi
  103665:	5f                   	pop    %edi
  103666:	5d                   	pop    %ebp
  103667:	c3                   	ret    

00103668 <memcmp>:
 *   match in both memory blocks has a greater value in @v1 than in @v2
 *   as if evaluated as unsigned char values;
 * - And a value less than zero indicates the opposite.
 * */
int
memcmp(const void *v1, const void *v2, size_t n) {
  103668:	55                   	push   %ebp
  103669:	89 e5                	mov    %esp,%ebp
  10366b:	83 ec 10             	sub    $0x10,%esp
    const char *s1 = (const char *)v1;
  10366e:	8b 45 08             	mov    0x8(%ebp),%eax
  103671:	89 45 fc             	mov    %eax,-0x4(%ebp)
    const char *s2 = (const char *)v2;
  103674:	8b 45 0c             	mov    0xc(%ebp),%eax
  103677:	89 45 f8             	mov    %eax,-0x8(%ebp)
    while (n -- > 0) {
  10367a:	eb 2e                	jmp    1036aa <memcmp+0x42>
        if (*s1 != *s2) {
  10367c:	8b 45 fc             	mov    -0x4(%ebp),%eax
  10367f:	0f b6 10             	movzbl (%eax),%edx
  103682:	8b 45 f8             	mov    -0x8(%ebp),%eax
  103685:	0f b6 00             	movzbl (%eax),%eax
  103688:	38 c2                	cmp    %al,%dl
  10368a:	74 18                	je     1036a4 <memcmp+0x3c>
            return (int)((unsigned char)*s1 - (unsigned char)*s2);
  10368c:	8b 45 fc             	mov    -0x4(%ebp),%eax
  10368f:	0f b6 00             	movzbl (%eax),%eax
  103692:	0f b6 d0             	movzbl %al,%edx
  103695:	8b 45 f8             	mov    -0x8(%ebp),%eax
  103698:	0f b6 00             	movzbl (%eax),%eax
  10369b:	0f b6 c8             	movzbl %al,%ecx
  10369e:	89 d0                	mov    %edx,%eax
  1036a0:	29 c8                	sub    %ecx,%eax
  1036a2:	eb 18                	jmp    1036bc <memcmp+0x54>
        }
        s1 ++, s2 ++;
  1036a4:	ff 45 fc             	incl   -0x4(%ebp)
  1036a7:	ff 45 f8             	incl   -0x8(%ebp)
    while (n -- > 0) {
  1036aa:	8b 45 10             	mov    0x10(%ebp),%eax
  1036ad:	8d 50 ff             	lea    -0x1(%eax),%edx
  1036b0:	89 55 10             	mov    %edx,0x10(%ebp)
  1036b3:	85 c0                	test   %eax,%eax
  1036b5:	75 c5                	jne    10367c <memcmp+0x14>
    }
    return 0;
  1036b7:	b8 00 00 00 00       	mov    $0x0,%eax
}
  1036bc:	89 ec                	mov    %ebp,%esp
  1036be:	5d                   	pop    %ebp
  1036bf:	c3                   	ret    
